mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
IDEA-123338
This commit is contained in:
@@ -719,8 +719,11 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
|
||||
LOG.assertTrue(typeParameter != null);
|
||||
if (!substitutor.getSubstitutionMap().containsKey(typeParameter)) {
|
||||
PsiType type = siteSubstitutor.substitute(typeParameter);
|
||||
if (type instanceof PsiClassType && ((PsiClassType)type).resolve() instanceof PsiTypeParameter) {
|
||||
type = TypeConversionUtil.erasure(type, siteSubstitutor);
|
||||
if (type instanceof PsiClassType) {
|
||||
final PsiClass aClass = ((PsiClassType)type).resolve();
|
||||
if (aClass instanceof PsiTypeParameter && ((PsiTypeParameter)aClass).getOwner() == typeParameter.getOwner()) {
|
||||
type = TypeConversionUtil.erasure(type, siteSubstitutor);
|
||||
}
|
||||
}
|
||||
substitutor = substitutor.put(typeParameter, type);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
class Aaa<Ta> {
|
||||
class Inner {}
|
||||
void doSmth(final Inner inner) {}
|
||||
}
|
||||
|
||||
class Bbb<T> extends Aaa<T> {
|
||||
class SubInner extends Aaa<T>.Inner {}
|
||||
void doSmth(final SubInner inner) {}
|
||||
void ambiguousCall() {
|
||||
doSmth (new SubInner());
|
||||
}
|
||||
}
|
||||
@@ -344,6 +344,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA123352() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA123518() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA64103() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA123338() { 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