mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-30 08:24:34 +00:00
Update codegen.rs
This commit is contained in:
parent
5179a04db4
commit
e4c61392d2
1 changed files with 3 additions and 1 deletions
|
@ -1765,7 +1765,9 @@ impl CodeGenerator {
|
|||
if class.need_to_gen_new {
|
||||
self.emit_new_func(&class.sig, class.__new__);
|
||||
}
|
||||
self.emit_frameless_block(class.methods, vec![]);
|
||||
if !class.methods.is_empty() {
|
||||
self.emit_frameless_block(class.methods, vec![]);
|
||||
}
|
||||
if self.cur_block().stack_len == 0 {
|
||||
self.emit_load_const(ValueObj::None);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue