mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 19:02:28 +00:00
parent
f70cb4f34a
commit
e58616b975
4 changed files with 80 additions and 15 deletions
|
@ -795,6 +795,20 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
emit.Call(c.prog.BinWriter, opcode.CALLL, f.label)
|
||||
}
|
||||
|
||||
if c.scope != nil && c.scope.voidCalls[n] {
|
||||
var sz int
|
||||
if f != nil {
|
||||
sz = f.decl.Type.Results.NumFields()
|
||||
} else if !isBuiltin {
|
||||
// lambda invocation
|
||||
f := c.typeOf(n.Fun).Underlying().(*types.Signature)
|
||||
sz = f.Results().Len()
|
||||
}
|
||||
for i := 0; i < sz; i++ {
|
||||
emit.Opcode(c.prog.BinWriter, opcode.DROP)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
case *ast.SelectorExpr:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue