mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
moreSpecific conflicts resolve (IDEA-111085)
This commit is contained in:
@@ -626,6 +626,8 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
|
||||
}
|
||||
|
||||
private static Specifics chooseHigherDimension(PsiType type1, PsiType type2) {
|
||||
if (type1 != null && type1.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) return null;
|
||||
if (type2 != null && type2.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) return null;
|
||||
int d1 = type1 != null ? type1.getArrayDimensions() : 0;
|
||||
int d2 = type2 != null ? type2.getArrayDimensions() : 0;
|
||||
if (d1 > d2) {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
|
||||
class Main {
|
||||
public <T> T foo(String str, Class<T> classOfT) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> T foo(String str, Serializable typeOfT) {
|
||||
return null;
|
||||
}
|
||||
|
||||
{
|
||||
asList(foo("", String[].class));
|
||||
}
|
||||
|
||||
public static <T> List<T> asList(T... a) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -305,6 +305,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA110947() { doTest5(false); }
|
||||
public void testNoInferenceFromTypeCast() { doTest5(false); }
|
||||
public void testCaptureWildcardsInTypeCasts() { doTest5(false); }
|
||||
public void testIDEA111085() { doTest5(false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user