compiler: support nested slice element assignment
This commit is contained in:
parent
5b0e73ddf0
commit
8cf7871c26
2 changed files with 11 additions and 2 deletions
|
@ -432,8 +432,7 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
if !isAssignOp {
|
||||
ast.Walk(c, n.Rhs[i])
|
||||
}
|
||||
name := t.X.(*ast.Ident).Name
|
||||
c.emitLoadVar(name)
|
||||
ast.Walk(c, t.X)
|
||||
ast.Walk(c, t.Index)
|
||||
emit.Opcode(c.prog.BinWriter, opcode.ROT)
|
||||
emit.Opcode(c.prog.BinWriter, opcode.SETITEM)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue