Commit 6bb2b2ed authored by gsamain's avatar gsamain

Make new statement on cypclass call default constructor

parent bfb25060
...@@ -5913,6 +5913,8 @@ class SimpleCallNode(CallNode): ...@@ -5913,6 +5913,8 @@ class SimpleCallNode(CallNode):
max_nargs = len(func_type.args) max_nargs = len(func_type.args)
expected_nargs = max_nargs - func_type.optional_arg_count expected_nargs = max_nargs - func_type.optional_arg_count
actual_nargs = len(self.args) actual_nargs = len(self.args)
if self.type.is_cyp_class and isinstance(self.function, NewExprNode):
return "%s()" % self.function.result()
for formal_arg, actual_arg in args[:expected_nargs]: for formal_arg, actual_arg in args[:expected_nargs]:
arg_code = actual_arg.result_as(formal_arg.type) arg_code = actual_arg.result_as(formal_arg.type)
arg_list_code.append(arg_code) arg_list_code.append(arg_code)
......
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