mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert (IDEA-120153)
This commit is contained in:
+5
-1
@@ -713,7 +713,11 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
|
||||
ProgressManager.checkCanceled();
|
||||
LOG.assertTrue(typeParameter != null);
|
||||
if (!substitutor.getSubstitutionMap().containsKey(typeParameter)) {
|
||||
substitutor = substitutor.put(typeParameter, TypeConversionUtil.erasure(siteSubstitutor.substitute(typeParameter), substitutor));
|
||||
PsiType type = siteSubstitutor.substitute(typeParameter);
|
||||
if (type instanceof PsiClassType && ((PsiClassType)type).resolve() instanceof PsiTypeParameter) {
|
||||
type = TypeConversionUtil.erasure(type, substitutor);
|
||||
}
|
||||
substitutor = substitutor.put(typeParameter, type);
|
||||
}
|
||||
}
|
||||
return substitutor;
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
class Idea {
|
||||
class Library<T> {
|
||||
public void f(Base<T> x) {
|
||||
}
|
||||
public void f(Derived<T> x) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wrapper<T> {
|
||||
}
|
||||
|
||||
class Base<In> {
|
||||
}
|
||||
class Derived<In> extends Base<In> {
|
||||
}
|
||||
|
||||
public void main(Derived<Wrapper<String>> x) {
|
||||
new Library<Wrapper<String>>().f(x);
|
||||
}
|
||||
}
|
||||
@@ -336,6 +336,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA118037() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA119546() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA118527() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA120153() { 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