mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
type distinction tweak (IDEA-134960)
This commit is contained in:
@@ -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;
|
||||
|
||||
+11
@@ -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);
|
||||
}
|
||||
}
|
||||
+4
@@ -918,4 +918,8 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testAccessClassForWildcardCaptureType() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDistinguishTypeArgs() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user