good code red: do not create ? super Object constraint as nothing would match (IDEA-77991)

This commit is contained in:
anna
2012-04-03 19:19:43 +02:00
parent b053dbdfdf
commit 6719c86450
3 changed files with 17 additions and 1 deletions
@@ -0,0 +1,14 @@
class Test {
static {
Class<Test> testClass = get(Test.class);
foo(testClass);
}
static <E> Class<E> get(Class<? super E> value) {
return null;
}
static <E> E foo(Class<? super E> value) {
return null;
}
}
@@ -120,6 +120,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testTypeParameterBoundVisibilityJdk14() throws Exception { doTest(false);}
public void testUncheckedWarningsLevel6() throws Exception { doTest(true);}
public void testIDEA77991() throws Exception { doTest(false);}
public void testJavaUtilCollections_NoVerify() throws Exception {
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));