compiler: Accept more variable types in print()

Этот коммит содержится в:
Ayke van Laethem 2018-04-26 23:41:20 +02:00
родитель d13566b302
коммит d17c21681b

6
tgo.go
Просмотреть файл

@ -569,7 +569,11 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
if err != nil { if err != nil {
return llvm.Value{}, err 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: case *types.Basic:
switch typ.Kind() { switch typ.Kind() {
case types.Uint8: case types.Uint8: