RFR: 8027682: javac wrongly accepts semicolons in package and import decls [v5]
Archie L. Cobbs
duke at openjdk.org
Fri Feb 10 23:38:28 UTC 2023
On Fri, 10 Feb 2023 16:41:36 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Archie L. Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Generate warnings instead of errors for source levels < 21.
>>
>> This improves backward compatibility as requested in the CSR (JDK-8301905).
>
> test/langtools/tools/javac/diags/examples/ExtraneousSemiColonError.java line 29:
>
>> 27: import java.util.Set;
>> 28:
>> 29: class ExtraneousSemiColonError {
>
> I think that we should have a dedicated test for the new feature, apart from the diagnostics oriented ones. The test could be executed twice once with option `-source 20` and once without it and provided two golden files accordingly.
Good idea - done. The regular unit tests are more precise.
-------------
PR: https://git.openjdk.org/jdk/pull/12448
More information about the compiler-dev
mailing list