Skip to content

Commit

Permalink
Update codegen.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Dec 28, 2023
1 parent 93f1dc0 commit a128719
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/erg_compiler/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,12 @@ impl PyCodeGenerator {
| "invert" | "is_" | "is_not" | "call" => {
self.load_operators();
}
"CodeType" => {
self.emit_global_import_items(
Identifier::public("types"),
vec![(Identifier::public("CodeType"), None)],
);
}
// NoneType is not defined in the global scope, use `type(None)` instead
"NoneType" => {
self.emit_push_null();
Expand Down

0 comments on commit a128719

Please sign in to comment.