We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47ab0d4 commit 1f3d146Copy full SHA for 1f3d146
mypyc/irbuild/mapper.py
@@ -46,6 +46,7 @@
46
str_rprimitive,
47
tuple_rprimitive,
48
uint8_rprimitive,
49
+ weakref_rprimitive,
50
)
51
52
@@ -102,6 +103,8 @@ def type_to_rtype(self, typ: Type | None) -> RType:
102
103
return tuple_rprimitive # Varying-length tuple
104
elif typ.type.fullname == "builtins.range":
105
return range_rprimitive
106
+ elif typ.type.fullname == "weakref.ReferenceType":
107
+ return weakref_rprimitive
108
elif typ.type in self.type_to_ir:
109
inst = RInstance(self.type_to_ir[typ.type])
110
# Treat protocols as Union[protocol, object], so that we can do fast
0 commit comments