mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 02:24:00 +07:00
(cherry picked from commit e1d8918aca30a74ffbf3d3bbf8af07c6f45b5244) IJ-CR-194233 GitOrigin-RevId: f5918ea65adb2bf6ccae0835c52e826b88deb0ad
39 lines
774 B
Java
39 lines
774 B
Java
class A {
|
|
A(C c) {}
|
|
|
|
static class B extends A {
|
|
B() {
|
|
super(new <error descr="Cannot reference 'C' before superclass constructor is called">C</error>());
|
|
}
|
|
|
|
B(int x) {
|
|
super(<error descr="Non-static method 'getC()' cannot be referenced from a static context">getC</error>());
|
|
}
|
|
|
|
B(double x) {
|
|
super(<error descr="Non-static field 'c' cannot be referenced from a static context">c</error>);
|
|
}
|
|
}
|
|
|
|
class B1 extends A {
|
|
B1() {
|
|
super(new <error descr="Cannot reference 'C' before superclass constructor is called">C</error>());
|
|
}
|
|
|
|
B1(int x) {
|
|
super(getC());
|
|
}
|
|
|
|
B1(double x) {
|
|
super(c);
|
|
}
|
|
}
|
|
|
|
private C getC() {
|
|
return new C();
|
|
}
|
|
|
|
private C c = new C();
|
|
|
|
private class C {}
|
|
} |