Commit 522ccb3f authored by gsamain's avatar gsamain

Make new statement on cypclass call default constructor

parent cd191856
......@@ -5904,6 +5904,8 @@ class SimpleCallNode(CallNode):
max_nargs = len(func_type.args)
expected_nargs = max_nargs - func_type.optional_arg_count
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]:
arg_code = actual_arg.result_as(formal_arg.type)
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