RFR: 8305671: javac rejects semicolons in compilation units with no imports [v5]
Archie Cobbs
acobbs at openjdk.org
Tue Jun 6 01:52:58 UTC 2023
> The fix for [JDK-8027682](https://bugs.openjdk.org/browse/JDK-8027682) created a new bug in which a program like this:
>
> package p;;
>
> would be rejected.
>
> This is due to the previous fix swallowing all the semicolons. Instead, in the case of semicolons followed by EOF, it needs to swallow all but the last one.
Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
- Merge branch 'master' into JDK-8305671
- Merge branch 'master' into JDK-8305671
- Consume extra semicolons in a more straightforward way.
- Merge branch 'master' into JDK-8305671
- Use ToolBox and add more tests per review suggestion.
- Allow a package declaration followed (only) by multiple commas.
-------------
Changes: https://git.openjdk.org/jdk/pull/13361/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13361&range=04
Stats: 92 lines in 2 files changed: 89 ins; 2 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/13361.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13361/head:pull/13361
PR: https://git.openjdk.org/jdk/pull/13361
More information about the compiler-dev
mailing list