mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 13:11:11 +00:00
fix: closure codegen bug
This commit is contained in:
parent
0bfd4044b5
commit
4012b323d5
4 changed files with 22 additions and 4 deletions
|
@ -745,7 +745,7 @@ impl CodeObj {
|
|||
write!(instrs, "{arg} ({})", self.varnames.get(arg).unwrap()).unwrap();
|
||||
}
|
||||
Opcode311::MAKE_CELL | Opcode311::LOAD_CLOSURE => {
|
||||
write!(instrs, "{arg} ({})", self.cellvars.get(arg).unwrap()).unwrap();
|
||||
write!(instrs, "{arg} ({})", self.varnames.get(arg).unwrap()).unwrap();
|
||||
}
|
||||
Opcode311::POP_JUMP_FORWARD_IF_FALSE | Opcode311::POP_JUMP_FORWARD_IF_TRUE => {
|
||||
write!(instrs, "{arg} (to {})", idx + arg * 2 + 2).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue