RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v11]

Vicente Romero vromero at openjdk.org
Thu May 18 22:36:07 UTC 2023


On Thu, 18 May 2023 22:22:25 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> This is the first draft of a patch for JEP 440 and JEP 441. Changes included:
>> 
>>  - the pattern matching for switch and record patterns features are made final, together with updates to tests.
>>  - parenthesized patterns are removed.
>>  - qualified enum constants are supported for case labels.
>> 
>> This change herein also includes removal record patterns in for each loop, which may be split into a separate PR in the future.
>
> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Disallowing annotations on record patterns.

minor comment, looks good

test/langtools/tools/javac/T8297602.java line 28:

> 26:  * @bug 8297602
> 27:  * @summary Compiler crash with type annotation and generic record during pattern matching
> 28:  * @compile/fail/ref=T8297602.out -XDrawDiagnostics T8297602.java

I think that this test can be eliminated as new test AnnotationErrors supersedes it.

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

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13074#pullrequestreview-1433538513
PR Review Comment: https://git.openjdk.org/jdk/pull/13074#discussion_r1198364712


More information about the core-libs-dev mailing list