mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
isLocalClass should work for nested local classes (IDEA-156777)
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
|
||||
class Program {
|
||||
public static void main(String[] args) {
|
||||
int[] arr = {1,2,3};
|
||||
final int x = arr.length;
|
||||
{
|
||||
class C {
|
||||
class D {
|
||||
int bar() {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new Runnable() {
|
||||
class D {
|
||||
int bar() {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
public void run() {}
|
||||
}.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -93,12 +93,12 @@ public class a {
|
||||
}
|
||||
void ff() {
|
||||
class inn {
|
||||
<error descr="Inner classes cannot have static declarations">interface i</error> {}
|
||||
<error descr="Interface not allowed here">interface i</error> {}
|
||||
}
|
||||
}
|
||||
|
||||
Object o = new Runnable() {
|
||||
<error descr="Inner classes cannot have static declarations">interface i</error> {}
|
||||
<error descr="Interface not allowed here">interface i</error> {}
|
||||
public void run() {}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user