mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 03:24:00 +00:00
compiler: Accept more variable types in print()
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user