Commit e30da17d authored by Xavier Thompson's avatar Xavier Thompson

Fix cpp object call analysis

parent 7075537e
......@@ -6036,10 +6036,12 @@ class SimpleCallNode(CallNode):
args = self.args
if func_type.is_cpp_class:
overloaded_entry = self.function.type.scope.lookup("operator()")
# operator() cannot be a non-member function
overloaded_entry = self.function.type.scope.lookup_here("operator()")
if overloaded_entry is None:
self.type = PyrexTypes.error_type
self.result_code = "<error>"
error(self.pos, "Object of type '%s' is not callable." % self.function.type)
return
self.function = CoerceFromCallable(self.function)
elif hasattr(self.function, 'entry'):
......
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