Skip to content

Commit

Permalink
Keep forward references in NamedTuples to due to mypyc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jul 3, 2023
1 parent 584b7a8 commit 61f5a97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mypyc/ir/class_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@


class VTableMethod(NamedTuple):
cls: ClassIR
cls: "ClassIR"
name: str
method: FuncIR
shadow_method: FuncIR | None
Expand Down
4 changes: 2 additions & 2 deletions mypyc/ir/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,5 +1574,5 @@ def visit_keep_alive(self, op: KeepAlive) -> T:
# (Serialization and deserialization *will* be used for incremental
# compilation but so far it is not hooked up to anything.)
class DeserMaps(NamedTuple):
classes: dict[str, ClassIR]
functions: dict[str, FuncIR]
classes: dict[str, "ClassIR"]
functions: dict[str, "FuncIR"]

0 comments on commit 61f5a97

Please sign in to comment.