Commit aaaef0bf authored by Robert Bradshaw's avatar Robert Bradshaw

Fix type inference.

parent 5d9787ee
......@@ -5363,7 +5363,7 @@ class CallNode(ExprNode):
elif function.entry.name in Builtin.types_that_construct_their_instance:
return result_type
func_type = self.function.analyse_as_type(env)
if func_type.is_struct_or_union or func_type.is_cpp_class:
if func_type and (func_type.is_struct_or_union or func_type.is_cpp_class):
return func_type
return py_object_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