mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testdata for IDEA-114894
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class IdeaBugTest {
|
||||
public void foo(List<Base> base) {
|
||||
MyCollection.fun<error descr="'fun(java.util.List<? extends Base>, java.util.Comparator<? super Base>)' in 'MyCollection' cannot be applied to '(java.util.List<Base>, SubComparator)'">(base, new SubComparator())</error>;
|
||||
}
|
||||
}
|
||||
|
||||
class Base { }
|
||||
class Sub extends Base { }
|
||||
|
||||
class SubComparator implements Comparator<Sub> {
|
||||
public int compare(Sub o1, Sub o2) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class MyCollection<E> {
|
||||
public static <T> void fun(List<? extends T> list, Comparator<? super T> comp) {
|
||||
}
|
||||
}
|
||||
@@ -323,6 +323,8 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest5(false);
|
||||
}
|
||||
|
||||
public void testIDEA114894() { doTest5(false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
assertNotNull(collectionsClass);
|
||||
|
||||
Reference in New Issue
Block a user