RFR: 8305671: javac rejects semicolons in compilation units with no imports [v5]
Archie Cobbs
acobbs at openjdk.org
Tue Jun 6 01:53:00 UTC 2023
On Tue, 6 Jun 2023 01:35:59 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> I note there are no tests that *list* 8027682 in their list of bugs. If a test is designed to test the fix for a bug, it should list the bug number in the `@bug` line in the test description.
>> I note that there is a test included in the patch for 8027682, but it lists an unrelated bug [JDK-5059679].
>> It's also a minimal test that does not include test cases for extra semicolons between a package statement and the first import statement.
>
>> > I'll add more tests, but extra semicolons prior to import statements aren't allowed;
>>
>> That would make it a negative test, and you would check that an appropriate error is generated. That being said, the test case might be included in the tests for [JDK-8027682].
>
> Gotcha. Checking for proper detection of illegal extra semicolons is already covered in [the fix for JDK-8027682](https://github.com/openjdk/jdk/commit/4b8f7db6be80e425bebfaf6f68d49da74f29386a).
> I note there are no tests that _list_ 8027682 in their list of bugs. If a test is designed to test the fix for a bug, it should list the bug number in the `@bug` line in the test description. I note that there is a test included in the patch for 8027682, but it lists an unrelated bug [JDK-5059679].
Ah yes - that's a bug bug (so to speak). Must have been a cut & paste error on my part.
I've filed [JDK-8309511](https://bugs.openjdk.org/browse/JDK-8309511) to fix that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13361#discussion_r1218774052
More information about the compiler-dev
mailing list