mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
IDEA-19619 (highlight invalid for init statements)
This commit is contained in:
@@ -1,54 +1,54 @@
|
||||
// continue outside of.../loop label
|
||||
public class a {
|
||||
class a {
|
||||
class ff { }
|
||||
|
||||
void f() {
|
||||
<error descr="Continue outside of loop">continue;</error>
|
||||
|
||||
while (true) {
|
||||
continue;
|
||||
}
|
||||
do { continue; } while (true);
|
||||
|
||||
switch (1) {
|
||||
case 1: <error descr="Continue outside of loop">continue;</error>
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
new ff() {
|
||||
void f() {
|
||||
void f() {
|
||||
<error descr="Continue outside of loop">continue;</error>
|
||||
}
|
||||
};
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
while (true) {
|
||||
class s {
|
||||
{
|
||||
<error descr="Continue outside of loop">continue;</error>
|
||||
}
|
||||
{
|
||||
<error descr="Continue outside of loop">continue;</error>
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
do {
|
||||
class s {
|
||||
{
|
||||
<error descr="Continue outside of loop">continue;</error>
|
||||
}
|
||||
{
|
||||
<error descr="Continue outside of loop">continue;</error>
|
||||
}
|
||||
}
|
||||
continue;
|
||||
} while (true);
|
||||
|
||||
|
||||
|
||||
a:
|
||||
if (2==4) {
|
||||
for (;;) {
|
||||
<error descr="Not a loop label: 'a'">continue a;</error>
|
||||
}
|
||||
for (;;) {
|
||||
<error descr="Not a loop label: 'a'">continue a;</error>
|
||||
}
|
||||
}
|
||||
|
||||
a:
|
||||
@@ -56,12 +56,10 @@ public class a {
|
||||
for (;;) {
|
||||
<error descr="Not a loop label: 'a'">continue a;</error>
|
||||
}
|
||||
|
||||
|
||||
|
||||
int i = 0;
|
||||
for (<error descr="Not a statement">i==0?7:8;</error> ; ) ;
|
||||
for (<error descr="Invalid statement">if (i<0) i++;</error> ; ) ;
|
||||
for (new ff(), new ff(); ; ) ;
|
||||
}
|
||||
}
|
||||
|
||||
class ff {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user