Commit 53a48ee0 authored by Stefan Behnel's avatar Stefan Behnel

fix crash during C++ class type inference

parent c5b9b42f
...@@ -4163,9 +4163,10 @@ class CallNode(ExprNode): ...@@ -4163,9 +4163,10 @@ class CallNode(ExprNode):
def infer_type(self, env): def infer_type(self, env):
function = self.function function = self.function
func_type = function.infer_type(env)
if isinstance(function, NewExprNode): if isinstance(function, NewExprNode):
# note: needs call to infer_type() above
return PyrexTypes.CPtrType(function.class_type) return PyrexTypes.CPtrType(function.class_type)
func_type = function.infer_type(env)
if func_type is py_object_type: if func_type is py_object_type:
# function might have lied for safety => try to find better type # function might have lied for safety => try to find better type
entry = getattr(function, 'entry', None) entry = getattr(function, 'entry', None)
......
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