Skip to content

Commit f06e6b6

Browse files
Update class_ir.py
1 parent b8aadd6 commit f06e6b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypyc/ir/class_ir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def has_method_decl(self, name: str) -> bool:
333333
return any(name in ir.method_decls for ir in self.mro)
334334

335335
def has_no_subclasses(self) -> bool:
336-
return self.children == [] and not self.allow_interpreted_subclasses
336+
return self.children == [] and not self.allow_interpreted_subclasses and (self.is_ext_class or self.is_final_class)
337337

338338
def subclasses(self) -> set[ClassIR] | None:
339339
"""Return all subclasses of this class, both direct and indirect.

0 commit comments

Comments
 (0)