On Thu, 27 Apr 2023 18:21:56 GMT, Jim Laskey <jlas...@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