Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurens-W committed Dec 10, 2024
1 parent 06973e1 commit a0da837
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2083,9 +2083,15 @@ public TypeTree visitVariableExpressionType(VariableExpression expression) {
JavaType type = typeMapping.type(staticType(((org.codehaus.groovy.ast.expr.Expression) expression)));
Space prefix = whitespace();
StringBuilder keyword = new StringBuilder();
while (!Character.isWhitespace(source.charAt(cursor))) {
keyword.append(source.charAt(cursor));
cursor++;

if (expression.isDynamicTyped()) {
while (!Character.isWhitespace(source.charAt(cursor))) {
keyword.append(source.charAt(cursor));
cursor++;
}
} else {
keyword.append(expression.getOriginType().getUnresolvedName());
cursor += keyword.length();
}
J.Identifier ident = new J.Identifier(randomId(),
EMPTY,
Expand Down

0 comments on commit a0da837

Please sign in to comment.