Skip to content

Commit 7459701

Browse files
Update irbuild-classes.test
1 parent 9a50f54 commit 7459701

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

mypyc/test-data/irbuild-classes.test

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,3 +2686,25 @@ L0:
26862686
r6 = PyObject_VectorcallMethod(r3, r5, 9223372036854775812, 0)
26872687
keep_alive r2, self, key, val
26882688
return 1
2689+
2690+
[case testIsInstanceInterpretedSubclasses]
2691+
from mypy_extensions import mypyc_attr
2692+
2693+
@mypyc_attr(native_class=False)
2694+
class NonNative:
2695+
pass
2696+
@mypyc_attr(allow_interpreted_subclasses=True)
2697+
class InterpSubclasses:
2698+
pass
2699+
def isinstance_nonnative(x: Any) -> bool:
2700+
return isinstance(x, NonNative)
2701+
def isinstance_interpreted_subclasses(x: Any) -> None:
2702+
return isinstance(x, InterpSubclasses)
2703+
2704+
[out]
2705+
def isinstance_nonnative(x):
2706+
x :: Any
2707+
L0:
2708+
def isinstance_interpreted_subclasses(x):
2709+
x :: Any
2710+
L0:

0 commit comments

Comments
 (0)