Commit 670e7f6c authored by Robert Bradshaw's avatar Robert Bradshaw

Re-enable overloading for callable C++ classes.

parent 25ba3870
......@@ -4678,8 +4678,6 @@ class SimpleCallNode(CallNode):
self.type = PyrexTypes.error_type
self.result_code = "<error>"
return
self.function.type = overloaded_entry.type
overloaded_entry = None
elif hasattr(self.function, 'entry'):
overloaded_entry = self.function.entry
elif (isinstance(self.function, IndexNode) and
......@@ -4703,13 +4701,14 @@ class SimpleCallNode(CallNode):
return
entry.used = True
self.function.entry = entry
if not func_type.is_cpp_class:
self.function.entry = entry
self.function.type = entry.type
func_type = self.function_type()
else:
entry = None
func_type = self.function_type()
if not (func_type.is_cfunction or func_type.is_cpp_class):
if not func_type.is_cfunction:
error(self.pos, "Calling non-function type '%s'" % func_type)
self.type = PyrexTypes.error_type
self.result_code = "<error>"
......
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