IDEA-105846

This commit is contained in:
anna
2013-05-16 11:29:27 +02:00
parent c727ef8afe
commit 103bf1fed3
3 changed files with 3 additions and 2 deletions
@@ -99,7 +99,7 @@ public class PsiCapturedWildcardType extends PsiType {
}
else {
return bound instanceof PsiCapturedWildcardType
? ((PsiCapturedWildcardType)bound).getUpperBound()
? PsiWildcardType.createSuper(myContext.getManager(), ((PsiCapturedWildcardType)bound).getUpperBound())
: PsiType.getJavaLangObject(myContext.getManager(), getResolveScope());
}
}
@@ -146,7 +146,7 @@ public class TypesDistinctProver {
if (superBoundClass instanceof PsiTypeParameter) return false;
return !InheritanceUtil.isInheritorOrSelf(superBoundClass, extendsBoundClass, true);
}
return true;
return provablyDistinct(extendsBound, superBound);
}
if (!type1.isBounded() || !type2.isBounded()) {
@@ -1,5 +1,6 @@
class MyClass {
public static void main(Class<? extends MyClass> clazz){
clazz = (Class<? extends MyClass>) clazz.getSuperclass();
<error descr="Incompatible types. Found: 'java.lang.Class<capture<? super capture<? extends MyClass>>>', required: 'java.lang.Class<? extends MyClass>'">clazz = clazz.getSuperclass()</error>;
}
}