danielsun1106 commented on a change in pull request #1141: Refine some code
URL: https://github.com/apache/groovy/pull/1141#discussion_r367206102
 
 

 ##########
 File path: src/main/java/org/apache/groovy/ast/tools/ExpressionUtils.java
 ##########
 @@ -74,7 +74,7 @@ public static ConstantExpression 
transformBinaryConstantExpression(final BinaryE
                 Expression left = 
transformInlineConstants(be.getLeftExpression(), targetType);
                 Expression right = 
transformInlineConstants(be.getRightExpression(), targetType);
                 if (left instanceof ConstantExpression && right instanceof 
ConstantExpression) {
-                    return configure(be, new ConstantExpression((String) 
((ConstantExpression) left).getValue() + ((ConstantExpression) 
right).getValue()));
+                    return configure(be, new 
ConstantExpression(((ConstantExpression) left).getValue() + 
((ConstantExpression) right).getValue()));
 
 Review comment:
   This may cause compilation error ;-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to