mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: load nil
directly on inline
This commit is contained in:
parent
3484025065
commit
57a0377c81
2 changed files with 7 additions and 0 deletions
|
@ -230,6 +230,9 @@ func (c *codegen) emitLoadVar(pkg string, name string) {
|
|||
if vi.tv.Value != nil {
|
||||
c.emitLoadConst(vi.tv)
|
||||
return
|
||||
} else if vi.index == unspecifiedVarIndex {
|
||||
emit.Opcodes(c.prog.BinWriter, opcode.PUSHNULL)
|
||||
return
|
||||
}
|
||||
c.emitLoadByIndex(vi.refType, vi.index)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue