Skip to content

Commit e464d5c

Browse files
committed
feat: proper weakref support
1 parent 555edf3 commit e464d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypyc/irbuild/vtable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def compute_vtable(cls: ClassIR) -> None:
1414
return
1515

1616
if not cls.is_generated:
17-
cls.has_dict = any(x.inherits_python for x in cls.mro)
17+
cls.has_dict = cls.supports_weakref = any(x.inherits_python for x in cls.mro)
1818

1919
for t in cls.mro[1:]:
2020
# Make sure all ancestors are processed first

0 commit comments

Comments
 (0)