-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
- Using ANTLR 4.13.0
- JDK 21 EA build (21.ea.28-open)
- Created full working example as reproducer
- URL: https://github.com/khmarbaise/issue-antlr-4.13.0
- The github actions is done to build with JDK21 first and second with JDK20 to see the difference.
During the compilation of the example project it will emit compilation warnings:
[INFO] --- compiler:3.11.0:compile (default-compile) @ issue-antlr-4.13.0 ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 4 source files with javac [debug release 21] to target/classes
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[95,50] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[174,70] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[187,67] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[199,69] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[217,76] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[231,68] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[241,68] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[253,75] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[263,66] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[275,72] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[287,75] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprParser.java:[299,72] possible 'this' escape before subclass is fully initialized
[WARNING] ../issue-antlr-4.13.0/target/generated-sources/antlr4/com/soebes/rpn/grammar/ExprLexer.java:[88,49] possible 'this' escape before subclass is fully initialized
The same code compiles in JDK20.0.1 without WARNING. This implies very likely that it's related to JDK21 itself.
Metadata
Metadata
Assignees
Labels
No labels