compiler: fix a bug with FromAddress handling

Conversion of string to address with FromAddress is performed
at compile time so there is no need to push parameters on stack.
This commit is contained in:
Evgenii Stratonikov 2020-01-27 11:53:47 +03:00
parent 330db36168
commit 097d35b9d5
3 changed files with 52 additions and 3 deletions

View file

@ -185,6 +185,11 @@ func isAppCall(expr ast.Expr) bool {
return ok && t.Sel.Name == "AppCall"
}
func isFromAddress(expr ast.Expr) bool {
t, ok := expr.(*ast.SelectorExpr)
return ok && t.Sel.Name == "FromAddress"
}
func isByteArray(lit *ast.CompositeLit, tInfo *types.Info) bool {
if len(lit.Elts) == 0 {
return false