mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
IDEA-124352
This commit is contained in:
@@ -719,9 +719,9 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
|
||||
LOG.assertTrue(typeParameter != null);
|
||||
if (!substitutor.getSubstitutionMap().containsKey(typeParameter)) {
|
||||
PsiType type = siteSubstitutor.substitute(typeParameter);
|
||||
if (type instanceof PsiClassType) {
|
||||
if (type instanceof PsiClassType && typeParameter.getOwner() == method) {
|
||||
final PsiClass aClass = ((PsiClassType)type).resolve();
|
||||
if (aClass instanceof PsiTypeParameter && ((PsiTypeParameter)aClass).getOwner() == typeParameter.getOwner()) {
|
||||
if (aClass instanceof PsiTypeParameter && ((PsiTypeParameter)aClass).getOwner() == method) {
|
||||
type = TypeConversionUtil.erasure(type, siteSubstitutor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test<V> {
|
||||
|
||||
void bar(Win window, I<V> consumer) {}
|
||||
void bar(Comp component, I<V> consumer) {}
|
||||
|
||||
private void foo(final Win component, final I<V> consumer) {
|
||||
bar(component, consumer);
|
||||
}
|
||||
}
|
||||
|
||||
interface I<K>{}
|
||||
class Comp {}
|
||||
class Win extends Comp {}
|
||||
@@ -348,6 +348,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
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 testIDEA124271() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA124352() { 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