blackdrag commented on code in PR #2817:
URL: https://github.com/apache/groovy/pull/2817#discussion_r3809383872
##########
src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java:
##########
@@ -5034,6 +5256,22 @@ public List<DeclarationExpression>
getDeclarationExpressions() {
private static final String PACKAGE_INFO = "package-info";
private static final String PACKAGE_INFO_FILE_NAME = PACKAGE_INFO +
".groovy";
+ /**
+ * Marks a cast whose type is a bare (possibly qualified) name and whose
operand shape
+ * could equally be read as an operator continuation of a parenthesized
value expression,
+ * so that later resolution failures can explain the ambiguity
(GROOVY-10355).
+ */
+ public static final String AMBIGUOUS_BARE_NAME_CAST =
"_AMBIGUOUS_BARE_NAME_CAST";
Review Comment:
could we move that constant to a different place? I think ResolveVisitor
should not reference AstBuilder or any antlr4 class if we can avoid that.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]