Skip to content

Commit 9c64f4d

Browse files
BUGFIX: 'astToNewCall' function did not take into account the parameters present in source node..
1 parent 0a3e96c commit 9c64f4d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ast.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,15 @@ Ref<AstNode> astCreateFnCall(ScriptPosition pos, Ref<AstNode> fnExpr, bool newCa
137137
*/
138138
Ref<AstNode> astToNewCall(Ref<AstNode> callExpr)
139139
{
140-
return astCreateFnCall(callExpr->position(),
141-
callExpr->children()[0], true);
140+
auto result = astCreateFnCall(callExpr->position(),
141+
callExpr->children()[0], true);
142+
143+
auto children = callExpr->children();
144+
145+
for (size_t i = 0; i < children.size(); ++i)
146+
result->addChild(children[i]);
147+
148+
return result;
142149
}
143150

144151
/**

0 commit comments

Comments
 (0)