RFR: 8297118: Change IncompatibleClassChangeError to MatchException for exhaustive switch statements and switch expressions [v3]
Jan Lahoda
jlahoda at openjdk.org
Thu Dec 1 10:26:15 UTC 2022
> As per recent update of the JEP 433 specification, javac should use MatchException instead of IncompatbileClassChangeError to flag switches over enum values that were exhaustive at compile time, but no longer are exhaustive at runtime. This patch implements that change.
Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
- Merge branch 'master' into IncompatibleClassChangeError-to-MatchException
- Using pattern switch instead of record patterns as the feature key to determine whether MatchException should be used instead of ICCE.
- 8297118: Change IncompatibleClassChangeError to MatchException for exhaustive switch statements and switch expressions
- Using skipTypeVars as suggested.
- Reflecting review feedback - proper handling of type vars and intersection types.
- Not looking for common supertype, not solving in a loop.
- Reflecting review comment.
- Apply suggestions from code review
Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com>
- Better tests for inference with recursive bounds, and related fixes.
- Adding a kind to InstanceOfTree, as suggested.
- ... and 6 more: https://git.openjdk.org/jdk/compare/fa0c599a...1483a220
-------------
Changes: https://git.openjdk.org/jdk/pull/11189/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11189&range=02
Stats: 226 lines in 4 files changed: 220 ins; 1 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/11189.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11189/head:pull/11189
PR: https://git.openjdk.org/jdk/pull/11189
More information about the compiler-dev
mailing list