Integrated: 8305671: javac rejects semicolons in compilation units with no imports
Archie Cobbs
acobbs at openjdk.org
Mon Jun 26 19:08:17 UTC 2023
On Wed, 5 Apr 2023 18:37:05 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: a08352f6
Author: Archie Cobbs <acobbs at openjdk.org>
Committer: Vicente Romero <vromero at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a08352f62181d7ae010851959b35d1e11a184f40
Stats: 92 lines in 2 files changed: 89 ins; 2 del; 1 mod
8305671: javac rejects semicolons in compilation units with no imports
Reviewed-by: vromero
-------------
PR: https://git.openjdk.org/jdk/pull/13361
More information about the compiler-dev
mailing list