mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
super wildcard processing (IDEA-62529 )
This commit is contained in:
@@ -161,4 +161,15 @@ class CollectionHelper {
|
||||
final Collection<Number> numbers4 = CollectionHelper.<Number>convertUp(integers4);
|
||||
numbers4.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
//IDEA-62529
|
||||
class My<T> {
|
||||
private Class<? super T> getSuperclass(){
|
||||
return null;
|
||||
}
|
||||
|
||||
public void test() {
|
||||
if (getSuperclass() == List.class);
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@ public class TypesDistinctProver {
|
||||
final PsiType superBound = ((PsiWildcardType)type1).getSuperBound();
|
||||
if (superBound instanceof PsiArrayType &&
|
||||
proveArrayTypeDistinct(((PsiWildcardType)type1).getManager().getProject(), (PsiArrayType)superBound, type2)) return true;
|
||||
|
||||
final PsiClass boundClass1 = PsiUtil.resolveClassInType(superBound);
|
||||
if (boundClass1 == null || boundClass1 instanceof PsiTypeParameter) return false;
|
||||
return !InheritanceUtil.isInheritorOrSelf(boundClass1, psiClass2, true);
|
||||
|
||||
Reference in New Issue
Block a user