File tree Expand file tree Collapse file tree
main/java/org/openrewrite/groovy
test/java/org/openrewrite/groovy/tree Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1668,7 +1668,7 @@ public void visitConstantExpression(ConstantExpression expression) {
16681668 }
16691669 for (; i < source .length (); i ++) {
16701670 char c = source .charAt (i );
1671- if (!(isJavaIdentifierPart (c ) || (c == '.' && source .length () > (i + 1 ) && isJavaIdentifierPart (source .charAt (i + 1 ))))) {
1671+ if (!(isJavaIdentifierPart (c ) || (c == '.' && source .length () > (i + 1 ) && Character . isDigit (source .charAt (i + 1 ))))) {
16721672 break ;
16731673 }
16741674 }
Original file line number Diff line number Diff line change @@ -67,6 +67,13 @@ void emptyArgsWithParens() {
6767 );
6868 }
6969
70+ @ Test
71+ void closureArgumentOnNumericLiteralReceiver () {
72+ rewriteRun (
73+ groovy ("50.times { 1 }" )
74+ );
75+ }
76+
7077 @ Test
7178 void noParentheses () {
7279 rewriteRun (
You can’t perform that action at this time.
0 commit comments