mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
[java-highlighting] JEP 432: A 'case null, default' label dominates all other switch labels
A 'default' label dominates a case label with a case pattern, and it also dominates a case label with a 'null' case constant. IDEA-309549 GitOrigin-RevId: 6877992c530e41a1200ea7c20d6405da4be0324b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5bc370c995
commit
b56985873a
@@ -0,0 +1,10 @@
|
||||
// "Make 'default' the last case" "true-preview"
|
||||
class X {
|
||||
void test(String s) {
|
||||
switch (s) {
|
||||
case "blah blah blah" -> System.out.println("blah blah blah");
|
||||
case null -> System.out.println("null");
|
||||
default -> System.out.println("default");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user