Files
Tagir Valeev a891bc5b66 [java-highlighting] break, continue errors -> StatementChecker; wording adjusted
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: c16e11baec8b9191ac809a34fc919a4375dd0ebd
2025-01-28 17:28:10 +00:00

51 lines
768 B
Java

// break outside of
public class a {
void f() {
<error descr="'break' outside of switch or loop">break;</error>
while (true) {
break;
}
do { break; } while (true);
switch (1) {
case 1: break;
}
for (;;) {
break;
}
for (;;) {
new ff() {
void f() {
<error descr="'break' outside of switch or loop">break;</error>
}
};
break;
}
while (true) {
class s {
{
<error descr="'break' outside of switch or loop">break;</error>
}
}
break;
}
do {
class s {
{
<error descr="'break' outside of switch or loop">break;</error>
}
}
break;
} while (true);
}
}
class ff {
}