RFR: 8300543 Compiler Implementation for Pattern Matching for switch
Jan Lahoda
jlahoda at openjdk.org
Fri Apr 14 12:56:51 UTC 2023
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.
-------------
Commit messages:
- Fixing test.
- Assignment to variables declared outside of guard not allowed.
- Adding test for incorrectly used guards.
- Merge branch 'master' into JDK-8300543
- Merge branch 'master' into JDK-8300543
- Removing trailing whitespace
- Fixing tests.
- Post-merge fix.
- Merge remote-tracking branch 'jdk/reduce-exhaustiveness' into JDK-8300543
- Support for 'overfitting' patterns.
- ... and 15 more: https://git.openjdk.org/jdk/compare/cd7d53c8...57445212
Changes: https://git.openjdk.org/jdk/pull/13074/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13074&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8300543
Stats: 3662 lines in 157 files changed: 1552 ins; 1682 del; 428 mod
Patch: https://git.openjdk.org/jdk/pull/13074.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13074/head:pull/13074
PR: https://git.openjdk.org/jdk/pull/13074
More information about the compiler-dev
mailing list