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

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Apr 25 10:46:28 UTC 2023


On Mon, 24 Apr 2023 15:16:18 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:
> 
>   Reflecting review changes.

Added some comments in the exhaustiveness test

test/langtools/tools/javac/patterns/Exhaustiveness.java line 1:

> 1: /*

Isn't `Isn't `testCoversType1` the same as `testExhaustiveStatement3` ?

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

Marked as reviewed by mcimadamore (Reviewer).

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


More information about the compiler-dev mailing list