multiple jdks test of correct check of inheritance with different type arguments

This commit is contained in:
Anna Kozlova
2015-01-22 19:14:30 +01:00
parent 6569ca585c
commit cfea16328e
3 changed files with 18 additions and 0 deletions
@@ -0,0 +1,6 @@
package p;
import java.io.Closeable;
import java.util.concurrent.*;
<error descr="'java.util.concurrent.Callable' cannot be inherited with different type arguments: 'java.lang.AutoCloseable' and 'java.io.Closeable'">abstract class B extends A implements Callable<Closeable></error> {
}
@@ -0,0 +1,5 @@
package p;
import java.util.concurrent.*;
public abstract class A implements Callable<AutoCloseable> {
}
@@ -117,6 +117,13 @@ public class MultipleJdksHighlightingTest extends UsefulTestCase {
myFixture.checkHighlighting();
}
@Bombed(month = Calendar.FEBRUARY, day = 20)
public void testGenericCallableWithDifferentTypeArgs() throws Exception {
final String name = getTestName(false);
myFixture.configureByFiles("java7/p/" + name + ".java", "java8/p/" + name + ".java");
myFixture.checkHighlighting();
}
private void doTest() {
final String name = getTestName(false);
for (Module module : new Module[] {myJava7Module, myJava8Module}) {