mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-106964
This commit is contained in:
+5
-9
@@ -599,15 +599,11 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
|
||||
if (!raw1 && raw2) return Specifics.FIRST;
|
||||
if (raw1 && !raw2) return Specifics.SECOND;
|
||||
|
||||
final Specifics substArraySpecifics = chooseHigherDimension(t1, t2);
|
||||
if (substArraySpecifics != null) {
|
||||
return substArraySpecifics;
|
||||
}
|
||||
else {
|
||||
final PsiTypeParameter p1 = map1.keySet().iterator().next();
|
||||
final PsiTypeParameter p2 = map2.keySet().iterator().next();
|
||||
return checkTypeParams(method1, method2, classSubstitutor1, classSubstitutor2, type1, type2, p1, p2);
|
||||
}
|
||||
final PsiTypeParameter p1 = map1.keySet().iterator().next();
|
||||
final PsiTypeParameter p2 = map2.keySet().iterator().next();
|
||||
final Specifics specifics = checkTypeParams(method1, method2, classSubstitutor1, classSubstitutor2, type1, type2, p1, p2);
|
||||
if (specifics != null) return specifics;
|
||||
return chooseHigherDimension(t1, t2);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import java.io.Serializable;
|
||||
|
||||
public abstract class Test {
|
||||
|
||||
abstract <T> T test(Class<T> cls);
|
||||
|
||||
abstract <T> T test(Serializable type);
|
||||
|
||||
private void call(){
|
||||
<error descr="Incompatible types. Found: 'java.lang.String[]', required: 'java.lang.String'">String s = test(String[].class);</error>
|
||||
}
|
||||
}
|
||||
@@ -236,6 +236,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA20244() throws Exception { doTest5(false);}
|
||||
public void testIDEA22005() throws Exception { doTest5(false);}
|
||||
public void testIDEA57259() throws Exception { doTest5(false);}
|
||||
public void testIDEA106964() throws Exception { doTest5(false);}
|
||||
public void testInheritedWithDifferentArgsInTypeParams() throws Exception { doTest5(false);}
|
||||
public void testIllegalForwardReferenceInTypeParameterDefinition() throws Exception { doTest5(false);}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user