mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[java] fixes and unifies 'break'/'continue' highlighting
GitOrigin-RevId: 4472c012bbc690ce96bdc43baa4075c4c14c1c62
This commit is contained in:
committed by
intellij-monorepo-bot
parent
624ff3b0a7
commit
83258b1714
+5
-2
@@ -10,12 +10,12 @@ class YieldStatements {
|
||||
default: <error descr="Yield outside of switch expression">yield 0;</error>
|
||||
}
|
||||
|
||||
System.out.println(switch (i) {
|
||||
out: System.out.println(switch (i) {
|
||||
case 1 -> { while (true) yield ref; }
|
||||
case 2 -> { while (true) break <error descr="Undefined label: 'wtf'">wtf</error>; }
|
||||
case 3 -> { yield ref; }
|
||||
case 4 -> { yield (ref); }
|
||||
case 5 -> { <error descr="Break outside of enclosing switch expression">break wtf;</error> }
|
||||
case 5 -> { break <error descr="Undefined label: 'wtf'">wtf</error>; }
|
||||
case 6 -> {
|
||||
int a = 0;
|
||||
a: switch (0) { default: yield a; }
|
||||
@@ -34,6 +34,9 @@ class YieldStatements {
|
||||
yield yield;
|
||||
}
|
||||
case 11 -> { yield <error descr="Expression type should not be 'void'">m(0)</error>; }
|
||||
case 12 -> {
|
||||
switch (i) { default: <error descr="Break outside of enclosing switch expression">break out;</error>; }
|
||||
}
|
||||
default -> throw new RuntimeException();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user