mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
this and super are not available inside anonymous class args
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
class A {
|
||||
public A(Object o) {
|
||||
}
|
||||
}
|
||||
|
||||
class B {}
|
||||
|
||||
class C extends B {
|
||||
static {
|
||||
A a = new A(<error descr="'C.this' cannot be referenced from a static context">this</error>) {};
|
||||
A a1 = new A(<error descr="'C.super' cannot be referenced from a static context">super</error>.clone()) {};
|
||||
}
|
||||
|
||||
{
|
||||
A a = new A(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user