compiler: convert AppCall parameter from string properly
This commit is contained in:
parent
d65d6ab08d
commit
77f9a2ee26
2 changed files with 28 additions and 0 deletions
|
@ -672,6 +672,13 @@ func (c *codegen) getByteArray(expr ast.Expr) []byte {
|
|||
buf[i] = byte(val)
|
||||
}
|
||||
return buf
|
||||
case *ast.CallExpr:
|
||||
if tv := c.typeInfo.Types[t.Args[0]]; tv.Value != nil {
|
||||
val := constant.StringVal(tv.Value)
|
||||
return []byte(val)
|
||||
}
|
||||
|
||||
return nil
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue