RFR: 8310128: Switch with unnamed patterns erroneously non-exhaustive [v2]

Aggelos Biboudis abimpoudis at openjdk.org
Thu Jun 15 16:39:30 UTC 2023


> When a record pattern has an unnamed pattern with the type of the corresponding record component being primitive, the switch is erroneously deemed as non-exhaustive. This PR addresses this issue by introducing the correct type for unnamed patterns during exhaustivity check.

Aggelos Biboudis has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Address comment
 - Merge branch 'master' into fix-#8310128
 - 8310128: Switch with unnamed patterns erroneously non-exhaustive

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14488/files
  - new: https://git.openjdk.org/jdk/pull/14488/files/b39cc777..f7aa8a16

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14488&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14488&range=00-01

  Stats: 984 lines in 25 files changed: 107 ins; 846 del; 31 mod
  Patch: https://git.openjdk.org/jdk/pull/14488.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14488/head:pull/14488

PR: https://git.openjdk.org/jdk/pull/14488


More information about the compiler-dev mailing list