fix: quantified subroutine subtyping bugs

This commit is contained in:
Shunsuke Shibayama 2023-02-22 02:40:51 +09:00
parent 4dcca2b06d
commit aa2cea60dd
28 changed files with 638 additions and 222 deletions

View file

@ -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