accept this refs inside anonymous classes in java 8 interfaces (IDEA-105892)

This commit is contained in:
anna
2013-04-22 15:45:31 +02:00
parent 566ef9c3ab
commit 11f81e0be7
3 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
interface Bazz {
Bazz foo = <error descr="Cannot find symbol variable this">Bazz.this</error>;
static void foo1() {
Bazz foo = <error descr="'Bazz.this' cannot be referenced from a static context">Bazz.this</error>;
}
Runnable bar = new Runnable() {
@Override
public void run() {
Bazz f = <error descr="Cannot find symbol variable this">Bazz.this</error>;
}
};
default void foo() {
Bazz foo = Bazz.this;
Runnable r = new Runnable() {
@Override
public void run() {
Bazz f = Bazz.this;
}
};
}
}