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/12/22 17:46:07 UTC

[GitHub] [groovy] eric-milles commented on a change in pull request #1450: GROOVY-9855: inline string concat sonner

eric-milles commented on a change in pull request #1450:
URL: https://github.com/apache/groovy/pull/1450#discussion_r547413422



##########
File path: src/main/java/org/apache/groovy/ast/tools/ExpressionUtils.java
##########
@@ -309,8 +309,15 @@ public static Expression transformInlineConstants(final Expression exp) {
             }
         } else if (exp instanceof BinaryExpression) {
             BinaryExpression be = (BinaryExpression) exp;
-            be.setLeftExpression(transformInlineConstants(be.getLeftExpression()));
-            be.setRightExpression(transformInlineConstants(be.getRightExpression()));
+            Expression lhs = transformInlineConstants(be.getLeftExpression());
+            Expression rhs = transformInlineConstants(be.getRightExpression());
+            if (lhs instanceof ConstantExpression && rhs instanceof ConstantExpression &&

Review comment:
       Yes, thanks.  I did have that when the code was located elsewhere.  I will get it updated.




----------------------------------------------------------------
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