Skip to content
Snippets Groups Projects
Commit 164400d0 authored by Emma Söderberg's avatar Emma Söderberg
Browse files

Adds creation of child handler in the List constructor for incremental/param.

For cases when a list is created via the List(T... ) constructor. This constructor
creates a child array and then calls addChild (which calls setChild). In setChild,
the creation of the child handler is controlled by whether the child array is null.
Creating the child handler in this constructor ensures that it is no null.
parent 706f7205
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,7 @@ ListDecl.constructor = [[
public $List.$List(T... initialChildren) {
$include(State.incHookConstructionStart)
children = new $ASTNode[initialChildren.length];
$include(ASTDecl.incrementalInitChildHandlers)
for (int i = 0; i < children.length; ++i) {
addChild(initialChildren[i]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment