RFR: 8027682: javac wrongly accepts semicolons in package and import decls [v6]
Jonathan Gibbons
jjg at openjdk.org
Tue Mar 21 18:04:46 UTC 2023
On Tue, 21 Mar 2023 17:55:12 GMT, Archie L. Cobbs <duke at openjdk.org> wrote:
>> Why is any `--release` option required? The test should only be run by JDK 20 and later, right?
>
> Per [this CSR comment](https://bugs.openjdk.org/browse/JDK-8301905?focusedCommentId=14559000&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14559000) it was requested to make this an error for source versions >= 21 and a warning for source versions prior to 21.
>
> In order to satisfy `diags/CheckExamples.java` I needed an example that would generate the warning.
>
> But I guess you're right... so the alternative would be to add `compiler.warn.extraneous.semicolon` to `diags/examples.not-yet.txt`?
No, sorry, I wasn't clear enough; my fault.
It is good to add an example (much better than editing the `not-yet.txt` file.).
The question was why any option specifying a version number is perceived to be required. What happens if you remove the option completely?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12448#discussion_r1143806737
More information about the compiler-dev
mailing list