Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/PrivateInInterfacesAnonymousThis.java
Tagir Valeev ed86103b09 Removing redundant code (IDEA-CR-61866)
Actually covered by other branches

GitOrigin-RevId: 6f8a400d4d6160f2ec7e198d8fbf0119e9d1c84c
2020-04-23 09:38:00 +00:00

29 lines
757 B
Java

interface Foo {
private void bar() {
new Runnable() {
@Override
public void run() {
System.out.println(Foo.this);
}
};
}
default void bar1() {
new Runnable() {
@Override
public void run() {
System.out.println(Foo.this);
}
};
}
static void bar2() {
new Runnable() {
@Override
public void run() {
System.out.println(<error descr="'Foo.this' cannot be referenced from a static context">Foo.this</error>);
}
};
}
int getX();
int x = <error descr="'Foo.this' cannot be referenced from a static context">this</error>.getX();
}