Skip to content

Commit 043d17f

Browse files
committed
Update vtable.py
1 parent 9ef6e13 commit 043d17f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypyc/irbuild/vtable.py

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

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

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

0 commit comments

Comments
 (0)