You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/01/16 02:39:50 UTC
[GitHub] [groovy] danielsun1106 commented on a change in pull request #1141:
Refine some code
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:
users@infra.apache.org
With regards,
Apache Git Services