super wildcard processing (IDEA-62529 )

This commit is contained in:
anna
2010-12-07 17:23:44 +03:00
parent f970c69061
commit d1caf4f877
@@ -51,7 +51,7 @@ public class TypesDistinctProver {
final PsiType extendsBound = ((PsiWildcardType)type1).getExtendsBound();
if (extendsBound instanceof PsiArrayType &&
proveArrayTypeDistinct(((PsiWildcardType)type1).getManager().getProject(), (PsiArrayType)extendsBound, type2)) return true;
final PsiClass boundClass1 = PsiUtil.resolveClassInType(TypeConversionUtil.erasure(extendsBound));
final PsiClass boundClass1 = PsiUtil.resolveClassInType(extendsBound);
if (boundClass1 == null) return false;
return proveExtendsBoundsDistinct(type1, type2, boundClass1, psiClass2);
}
@@ -60,7 +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(TypeConversionUtil.erasure(superBound));
final PsiClass boundClass1 = PsiUtil.resolveClassInType(superBound);
if (boundClass1 == null || boundClass1 instanceof PsiTypeParameter) return false;
return !InheritanceUtil.isInheritorOrSelf(boundClass1, psiClass2, true);
}