Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting8/ReferenceToPrivateClassOuterThis.java
T
Tagir Valeevandintellij-monorepo-bot acef03c3e4 IDEA-380311 [java-highlighting] Invalid code "cannot referenced from static context" not highlighted properly in Java
Follow-up: proper qualified references handling

GitOrigin-RevId: c7f470065ab5c4ad97c9fb6ba02d6fa603e62a84
2026-03-03 07:57:52 +00:00

39 lines
693 B
Java

class A {
A(C c) {}
static class B extends A {
B() {
super(<error descr="'A.this' cannot be referenced from a static context">A.this</error>.new C());
}
B(int x) {
super(<error descr="'A.this' cannot be referenced from a static context">A.this</error>.getC());
}
B(double x) {
super(<error descr="'A.this' cannot be referenced from a static context">A.this</error>.c);
}
}
class B1 extends A {
B1() {
super(A.this.new C());
}
B1(int x) {
super(A.this.getC());
}
B1(double x) {
super(A.this.c);
}
}
private C getC() {
return new C();
}
private C c = new C();
private class C {}
}