RFR: 8305671: javac rejects semicolons in compilation units with no imports [v4]

Jonathan Gibbons jjg at openjdk.org
Mon Jun 5 23:44:52 UTC 2023


On Mon, 5 Jun 2023 23:30:38 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> I'll add more tests, but extra semicolons prior to import statements aren't allowed; see [JDK-8027682].
>
>> 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].

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.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13361#discussion_r1218710067


More information about the compiler-dev mailing list