mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
equality asymmetry fixed (IDEA-118533)
This commit is contained in:
@@ -569,8 +569,10 @@ public final class PsiUtil extends PsiUtilCore {
|
||||
if (typeParameters1.length != typeParameters2.length) return false;
|
||||
for (int i = 0; i < typeParameters1.length; i++) {
|
||||
final PsiType substituted2 = s2.substitute(typeParameters2[i]);
|
||||
final PsiType substituted1 = s1.substitute(typeParameters1[i]);
|
||||
if (!Comparing.equal(s1.substituteWithBoundsPromotion(typeParameters1[i]), substituted2) &&
|
||||
!Comparing.equal(s1.substitute(typeParameters1[i]), substituted2)) return false;
|
||||
!Comparing.equal(s2.substituteWithBoundsPromotion(typeParameters2[i]), substituted1) &&
|
||||
!Comparing.equal(substituted1, substituted2)) return false;
|
||||
}
|
||||
if (aClass.hasModifierProperty(PsiModifier.STATIC)) return true;
|
||||
final PsiClass containingClass1 = aClass.getContainingClass();
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
|
||||
class IdeaGenericsFail {
|
||||
|
||||
public IdeaGenericsFail(Set<Klass<? extends Serializable>> map) {
|
||||
}
|
||||
|
||||
public static class Klass<T extends Serializable> {
|
||||
}
|
||||
|
||||
public static void main(final Set<Klass<?>> map) {
|
||||
new IdeaGenericsFail(map);
|
||||
}
|
||||
}
|
||||
@@ -357,6 +357,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
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 testIDEA112117() { 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