compiler: Accept more variable types in print()

This commit is contained in:
Ayke van Laethem
2018-04-26 23:41:20 +02:00
parent d13566b302
commit d17c21681b
+5 -1
View File
@@ -569,7 +569,11 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
if err != nil {
return llvm.Value{}, err
}
switch typ := arg.Type().(type) {
typ := arg.Type()
if _, ok := typ.(*types.Named); ok {
typ = typ.Underlying()
}
switch typ := typ.(type) {
case *types.Basic:
switch typ.Kind() {
case types.Uint8: