fix method signature erased equality (IDEA-57391)

This commit is contained in:
anna
2013-07-18 19:47:51 +02:00
parent 335edbe0b6
commit 4ea8185461
3 changed files with 9 additions and 1 deletions
@@ -379,7 +379,7 @@ public class MethodSignatureUtil {
final PsiType[] superParameterTypes = superSignature.getParameterTypes();
for (int i = 0; i < subParameterTypes.length; i++) {
PsiType type1 = subParameterTypes[i];
PsiType type2 = TypeConversionUtil.erasure(superParameterTypes[i]);
PsiType type2 = TypeConversionUtil.erasure(superParameterTypes[i], superSignature.getSubstitutor());
if (!Comparing.equal(type1, type2)) return false;
}
return true;
@@ -0,0 +1,7 @@
abstract class B<T> {
abstract <S extends T> void foo(T x, S y);
}
class A extends B<String> {
void foo(String x, String y) {}
}
@@ -299,6 +299,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testIDEA67835() { doTest5(false); }
public void testIDEA67744() { doTest5(false); }
public void testIDEA67682() { doTest5(false); }
public void testIDEA57391() { doTest5(false); }
public void testJavaUtilCollections_NoVerify() throws Exception {
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));