mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
fix: quantified subroutine subtyping bugs
This commit is contained in:
parent
4dcca2b06d
commit
aa2cea60dd
28 changed files with 638 additions and 222 deletions
|
@ -665,6 +665,15 @@ impl PyCodeGenerator {
|
|||
"int__" | "nat__" | "str__" | "float__" => {
|
||||
self.load_convertors();
|
||||
}
|
||||
// NoneType is not defined in the global scope, use `type(None)` instead
|
||||
"NoneType" => {
|
||||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::public("type"));
|
||||
self.emit_load_const(ValueObj::None);
|
||||
self.emit_precall_and_call(1);
|
||||
self.stack_dec();
|
||||
return;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
let name = self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue