mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
Fix code generation of else-less if
This commit is contained in:
parent
bff720ab9d
commit
356906a5fe
1 changed files with 2 additions and 0 deletions
|
@ -811,6 +811,8 @@ impl CodeGenerator {
|
|||
// no else block
|
||||
let idx_end = self.cur_block().lasti;
|
||||
self.edit_code(idx_pop_jump_if_false + 1, idx_end / 2);
|
||||
self.emit_load_const(ValueObj::None);
|
||||
self.stack_dec();
|
||||
self.stack_dec();
|
||||
}
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue