highlighting for incompatible return types in type parameter inheritors (IDEA-57274)

This commit is contained in:
anna
2013-10-10 20:34:36 +02:00
parent e03245e5c4
commit 993fb34281
4 changed files with 34 additions and 15 deletions
@@ -0,0 +1,8 @@
interface I{
void foo();
}
abstract class A {
abstract int foo();
abstract <<error descr="'foo()' in 'A' clashes with 'foo()' in 'I'; attempting to use incompatible return type"></error><error descr="'foo()' in 'A' clashes with 'foo()' in 'I'; attempting to use incompatible return type"></error>T extends A & I> void bar(T x);
}
@@ -318,6 +318,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testIDEA113225() throws Exception { doTest5(false); }
public void testIDEA67518() throws Exception { doTest5(false); }
public void testIDEA57252() throws Exception { doTest5(false); }
public void testIDEA57274() throws Exception { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
public void testJavaUtilCollections_NoVerify() throws Exception {
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));