type distinction tweak (IDEA-134960)

This commit is contained in:
Anna Kozlova
2015-12-03 19:11:09 +01:00
parent ddc19b0e31
commit 32147c73e1
3 changed files with 15 additions and 1 deletions
@@ -135,7 +135,6 @@ public class TypesDistinctProver {
if (type1 instanceof PsiClassType && ((PsiClassType)type1).hasParameters()) return true;
} else {
if (provablyDistinct(substitutedType1, substitutedType2, level + 1)) return true;
if (substitutedType1 instanceof PsiWildcardType && !((PsiWildcardType)substitutedType1).isBounded()) return true;
}
}
if (level < 2) return false;
@@ -0,0 +1,11 @@
import java.util.Set;
abstract class Test {
public <T> Set<java.lang.Class<? extends T>> getSubTypesOf(Class<T> type){
return null;
}
Set<Class<?>> foo(Class<?> interfaceClass){
return (Set<Class<?>>)getSubTypesOf(interfaceClass);
}
}
@@ -918,4 +918,8 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase {
public void testAccessClassForWildcardCaptureType() throws Exception {
doTest();
}
public void testDistinguishTypeArgs() throws Exception {
doTest();
}
}