RFR: 8314423: Multiple patterns without unnamed variables [v2]
Aggelos Biboudis
abimpoudis at openjdk.org
Wed Aug 16 15:22:38 UTC 2023
On Wed, 16 Aug 2023 15:08:26 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Cleanup of T8314216
>
> test/langtools/tools/javac/T8314216.java line 20:
>
>> 18:
>> 19: public static void main(String[] args) {
>> 20: new Test().test("ddd");
>
> Note `Test` is not in scope here (not declared), which is the cause of the `cant.resolve.location` error. Is there a reason to keep the `main` method here? Seems to me it should be fine to simply remove it?
Thx!
> test/langtools/tools/javac/T8314423.java line 4:
>
>> 2: * @test /nodynamiccopyright/
>> 3: * @bug 8314423
>> 4: * @summary Multiple patterns without unnamed variables
>
> Maybe use `@enablePreview` instead of `--enable-preview`?
I would like to avoid the `@enablePreview` to be applied to both `@compile` commands. In the first I test that it will raise the error by checking the preview feature, and in the second that it will compile successfully. Isn't `@enablePreview` going to be applied to both?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15310#discussion_r1296066984
PR Review Comment: https://git.openjdk.org/jdk/pull/15310#discussion_r1296069300
More information about the compiler-dev
mailing list