mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
type distinct prover asymmetry fixed (IDEA-118533)
This commit is contained in:
@@ -90,10 +90,13 @@ public class TypesDistinctProver {
|
||||
if (type2 instanceof PsiArrayType) {
|
||||
return proveArrayTypeDistinct(((PsiWildcardType)type1).getManager().getProject(), (PsiArrayType)type2, type1);
|
||||
}
|
||||
}
|
||||
if (type1 instanceof PsiCapturedWildcardType) return provablyDistinct(((PsiCapturedWildcardType)type1).getWildcard(), type2, level);
|
||||
} else {
|
||||
|
||||
if (type2 instanceof PsiWildcardType || type2 instanceof PsiCapturedWildcardType) return provablyDistinct(type2, type1, level);
|
||||
if (type2 instanceof PsiWildcardType) return provablyDistinct(type2, type1, level);
|
||||
|
||||
if (type1 instanceof PsiCapturedWildcardType) return provablyDistinct(((PsiCapturedWildcardType)type1).getWildcard(), type2, level);
|
||||
if (type2 instanceof PsiCapturedWildcardType) return provablyDistinct(type2, type1, level);
|
||||
}
|
||||
|
||||
|
||||
final PsiClassType.ClassResolveResult classResolveResult1 = PsiUtil.resolveGenericsClassInType(type1);
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
abstract class Test {
|
||||
|
||||
interface InputFormat<K, V> {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Class<? extends InputFormat<?, ?>> getInputFormatClass(final Class<? extends InputFormat> aClass)
|
||||
throws ClassNotFoundException {
|
||||
return (Class<? extends InputFormat<?, ?>>) aClass;
|
||||
}
|
||||
}
|
||||
@@ -356,6 +356,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA118536() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA125744() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA125423() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA118533() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user