mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
ambiguous method call: prefer non raw types (IDEA-100314)
This commit is contained in:
@@ -584,6 +584,12 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
|
||||
if (map1.size() == 1 && map2.size() == 1) {
|
||||
final PsiType t1 = map1.values().iterator().next();
|
||||
final PsiType t2 = map2.values().iterator().next();
|
||||
|
||||
boolean raw1 = t1 instanceof PsiClassType && ((PsiClassType)t1).hasParameters();
|
||||
boolean raw2 = t2 instanceof PsiClassType && ((PsiClassType)t2).hasParameters();
|
||||
if (!raw1 && raw2) return Specifics.FIRST;
|
||||
if (raw1 && !raw2) return Specifics.SECOND;
|
||||
|
||||
final Specifics substArraySpecifics = chooseHigherDimension(t1, t2);
|
||||
if (substArraySpecifics != null) {
|
||||
return substArraySpecifics;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
class Intellij {
|
||||
|
||||
public static <T> T getProperty(final String str, final Class<T> cls) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> T getProperty(final String str, final T defaultValue) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String[] ids = Intellij.getProperty(" ", String[].class);
|
||||
|
||||
}
|
||||
@@ -167,4 +167,5 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testEnclosingInstance() throws Exception { doTest(false, false); }
|
||||
public void testWrongArgsAndUnknownTypeParams() throws Exception { doTest(false, false); }
|
||||
public void testAmbiguousMethodCallIDEA97983() throws Exception { doTest(false, false); }
|
||||
public void testAmbiguousMethodCallIDEA100314() throws Exception { doTest(false, false); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user