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 8f926f4 commit 5b81f85Copy full SHA for 5b81f85
mypyc/irbuild/mapper.py
@@ -73,7 +73,8 @@ def type_to_rtype(self, typ: Type | None) -> RType:
73
74
typ = get_proper_type(typ)
75
if isinstance(typ, Instance):
76
- if typ.type.is_newtype:
+ if typ.type.is_newtype and len(typ.type.bases) == 1:
77
+ # I'm pretty sure this length check always returns True but am not positive and False would break things
78
# Unwrap NewType to its base type for rprimitive mapping
79
base_typeinfo = typ.type.bases[0].type
80
return self.type_to_rtype(Instance(base_typeinfo, []))
0 commit comments