Skip to content

Commit 40876a8

Browse files
fix: non-native class
1 parent d8b2f2b commit 40876a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypyc/irbuild/ll_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def isinstance_native(self, obj: Value, class_ir: ClassIR, line: int) -> Value:
701701
even faster type comparison checks `type(obj) is typ`.
702702
"""
703703
concrete = all_concrete_classes(class_ir)
704-
if concrete is None or len(concrete) > FAST_ISINSTANCE_MAX_SUBCLASSES + 1:
704+
if not class_ir.is_ext_class or concrete is None or len(concrete) > FAST_ISINSTANCE_MAX_SUBCLASSES + 1:
705705
return self.primitive_op(
706706
fast_isinstance_op, [obj, self.get_native_type(class_ir)], line
707707
)

0 commit comments

Comments
 (0)