Commit 7354f508 authored by Robert Bradshaw's avatar Robert Bradshaw

Testcase for #564, refcount bug in isinstance optimization

parent 5b4469d8
...@@ -73,3 +73,17 @@ def test_custom(): ...@@ -73,3 +73,17 @@ def test_custom():
""" """
assert isinstance(A(), A) assert isinstance(A(), A)
return True return True
def test_nested(x):
"""
>>> test_nested(1)
True
>>> test_nested(1.5)
True
>>> test_nested("a")
False
"""
cdef object a = (x, None)
if isinstance(a[0], (int, float)):
return True
return False
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment