mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[java] restores multifaceted switch labels support (parser/PSI + basic highlighting)
This commit is contained in:
+13
@@ -59,6 +59,19 @@ class EnhancedSwitchStatements {
|
||||
|
||||
switch (E.valueOf("E1")) {
|
||||
case <error descr="Constant expression required">null</error> -> noop();
|
||||
case <error descr="An enum switch case label must be the unqualified name of an enumeration constant">E.E1</error> -> noop();
|
||||
case E2 -> noop();
|
||||
}
|
||||
|
||||
switch (new Random().nextInt()) {
|
||||
case <error descr="Duplicate label '1'">1</error>, <error descr="Duplicate label '1'">1</error> -> noop();
|
||||
}
|
||||
|
||||
switch (new Random().nextInt()) {
|
||||
case 1, <error descr="Duplicate label '2'">2</error>:
|
||||
noop(); break;
|
||||
case 3, <error descr="Duplicate label '2'">2</error>:
|
||||
noop(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user