Commit 7577a28d authored by Robert Bradshaw's avatar Robert Bradshaw

Fix compiler crash in isinstance optimization.

parent ba64a2a3
......@@ -3434,7 +3434,7 @@ class FinalOptimizePhase(Visitor.CythonTransform):
"""
self.visitchildren(node)
if node.function.type.is_cfunction and isinstance(node.function, ExprNodes.NameNode):
if node.function.name == 'isinstance':
if node.function.name == 'isinstance' and len(node.args) == 2:
type_arg = node.args[1]
if type_arg.type.is_builtin_type and type_arg.type.name == 'type':
cython_scope = self.context.cython_scope
......
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