Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting8/CaptureItself.java
Tagir Valeev 161f6cf1a9 Prevent creation of recursive PsiCapturedWildcardType
Fixes IDEA-235214 Highlighting freezes when captured wildcard used on the type with cyclic dependency in type variable

GitOrigin-RevId: 16d114ccab944d55dfbbdc29c227d60756e2ba1a
2020-03-18 06:31:42 +00:00

16 lines
485 B
Java

class C1<<error descr="Cyclic inheritance involving 'T'"></error>T extends T> {
private T value;
public boolean equals(Object obj) {
return this == obj || obj instanceof C1 && ((C1<?>)obj).value == value;
}
}
class C2<<error descr="Cyclic inheritance involving 'A'"></error>A extends B, B extends A> {
private A a;
private B b;
public boolean equals(Object obj) {
return this == obj || obj instanceof C2 && ((C2<?, ?>)obj).a == a && ((C2<?, ?>)obj).b == b;
}
}