Skip to content

Commit

Permalink
Fix for primitive array initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Apr 19, 2018
1 parent a94893e commit 7b42918
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3533,7 +3533,7 @@ public Expression visitCreator(CreatorContext ctx) {
ctx);
*/
ConstructorCallExpression constructorCallExpression = new ConstructorCallExpression(classNode, arguments);
ASTNode nameNode = configureAST(new ConstantExpression(classNode.getName()), ctx.createdName().qualifiedClassName());
ASTNode nameNode = configureAST(new ConstantExpression(classNode.getName()), ctx.createdName());
constructorCallExpression.setNameStart(nameNode.getStart());
constructorCallExpression.setNameEnd(nameNode.getEnd() - 1);
return configureAST(constructorCallExpression, ctx);
Expand Down Expand Up @@ -3616,8 +3616,10 @@ public Expression visitCreator(CreatorContext ctx) {
componentType = componentType.getComponentType();
configureAST(componentType, ctx, configureAST(new ConstantExpression(""), annOptCtxt.get(i)));
}
ASTNode nameNode = configureAST(new ConstantExpression(""), ctx.createdName().qualifiedClassName());
arrayExpression.setNameStart(nameNode.getStart()); arrayExpression.setNameEnd(nameNode.getEnd() - 1);

ASTNode nameNode = configureAST(new ConstantExpression(classNode.getName()), ctx.createdName());
arrayExpression.setNameStart(nameNode.getStart());
arrayExpression.setNameEnd(nameNode.getEnd() - 1);
// GRECLIPSE end
return configureAST(arrayExpression, ctx);
}
Expand Down

0 comments on commit 7b42918

Please sign in to comment.