RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]
Jan Lahoda
jlahoda at openjdk.org
Fri Apr 28 14:35:53 UTC 2023
On Thu, 27 Apr 2023 18:21:56 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> Add flexible main methods and anonymous main classes to the Java language.
>
> Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits:
>
> - Merge branch 'master' into 8306112
> - PreviewFeatures.isEnabled()
> - Clean up isPreview
> - Missing exception
> - Corrections
> - Update VM.java
> - Clean up testing
> - Update TestJavacTaskScanner.java
> - Merge branch 'master' into 8306112
> - Clean up
> - ... and 4 more: https://git.openjdk.org/jdk/compare/96cdf93b...53a5321d
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java line 3933:
> 3931: if (Feature.ANONYMOUS_MAIN_CLASSES.allowedInSource(source) &&
> 3932: !isDeclaration() &&
> 3933: (token.kind == VOID || token.kind == IDENTIFIER)) {
These checks (`token.kind == VOID || token.kind == IDENTIFIER`) for token kind will fail to parse fields of primitive types (or methods with primitive types as a return type)? Either the tests must include the primitive types, or (maybe) just this test can be avoided completely?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1180481474
More information about the build-dev
mailing list