Commit 83198d1b authored by Robert Bradshaw's avatar Robert Bradshaw

Fix isinstance bug discovered by Lisandro Dalcin

parent a85eea00
......@@ -162,7 +162,7 @@ class FinalOptimizePhase(Visitor.CythonTransform):
def visit_SimpleCallNode(self, node):
self.visitchildren(node)
if node.function.type.is_cfunction:
if node.function.type.is_cfunction and isinstance(node.function, ExprNodes.NameNode):
if node.function.name == 'isinstance':
type_arg = node.args[1]
if type_arg.type.is_builtin_type and type_arg.type.name == 'type':
......
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