mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
testdata for IDEA-78402
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
class Reference<T> {}
|
||||
|
||||
class Bug {
|
||||
private static <T> void foo(List<T> x, Reference<String> y) {
|
||||
System.out.println(x);
|
||||
}
|
||||
|
||||
private static <T> void foo(Collection<T> x, Reference<T> y) {
|
||||
System.out.println(x);
|
||||
}
|
||||
|
||||
public static void bazz(List<String> bar) {
|
||||
foo<error descr="Ambiguous method call: both 'Bug.foo(List<String>, Reference<String>)' and 'Bug.foo(Collection<String>, Reference<String>)' match">(bar, null)</error>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
class Reference<T> {}
|
||||
|
||||
class Bug {
|
||||
private static <T> void foo(List<T> x, Reference<String> y) {
|
||||
System.out.println(x);
|
||||
}
|
||||
|
||||
private static <T> void foo(Collection<T> x, Reference<T> y) {
|
||||
System.out.println(x);
|
||||
}
|
||||
|
||||
public static void bazz(List<String> bar) {
|
||||
foo<error descr="Ambiguous method call: both 'Bug.foo(List<String>, Reference<String>)' and 'Bug.foo(Collection<String>, Reference<String>)' match">(bar, null)</error>;
|
||||
}
|
||||
}
|
||||
@@ -371,6 +371,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA126697() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, true); }
|
||||
public void testIDEA126633() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA124363() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA78402() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
//jdk should propagate LL 1.4 but actually it provides LL 1.7?!
|
||||
public void testCastObjectToIntJdk14() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_4, false); }
|
||||
|
||||
|
||||
@@ -759,6 +759,8 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testIDEA78402() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user