[jdk17] RFR: 8268333: javac crashes when pattern matching switch contains default case which is not last

Jan Lahoda jlahoda at openjdk.java.net
Fri Jun 11 13:11:10 UTC 2021


[this is a copy of a PR from openjdk/jdk:
https://github.com/openjdk/jdk/pull/4397
]

The pattern matching switch desugaring should recognize cases where there is default case followed by a type pattern case, and not replace the type pattern with another default.

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

Commit messages:
 - 8268333: javac crashes when pattern matching switch contains default case which is not last

Changes: https://git.openjdk.java.net/jdk17/pull/26/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=26&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8268333
  Stats: 30 lines in 2 files changed: 28 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/26.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/26/head:pull/26

PR: https://git.openjdk.java.net/jdk17/pull/26


More information about the compiler-dev mailing list