forked from TrueCloudLab/neoneo-go
compiler: push Null item for nil
values
This commit is contained in:
parent
a4e4439967
commit
afd8f3b87a
1 changed files with 2 additions and 0 deletions
|
@ -586,6 +586,8 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
case *ast.Ident:
|
||||
if tv := c.typeAndValueOf(n); tv.Value != nil {
|
||||
c.emitLoadConst(tv)
|
||||
} else if n.Name == "nil" {
|
||||
emit.Opcode(c.prog.BinWriter, opcode.PUSHNULL)
|
||||
} else {
|
||||
c.emitLoadVar(n.Name)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue