mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testdata for IDEA-21602
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
public class IDEABug {
|
||||
|
||||
static class ClassA {
|
||||
static <T> void sayHello(Collection<? extends T> msg) {}
|
||||
}
|
||||
|
||||
static class ClassB extends ClassA {
|
||||
static <T extends String> void sayHello(Collection<? extends T> msg) {}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
ClassB.sayHello(Collections.<String>emptyList());
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
public class IDEABug {
|
||||
|
||||
static class ClassA {
|
||||
static <T> void sayHello(Collection<? extends T> msg) {}
|
||||
}
|
||||
|
||||
static class ClassB extends ClassA {
|
||||
<error descr="'sayHello(Collection<? extends T>)' in 'IDEABug.ClassB' clashes with 'sayHello(Collection<? extends T>)' in 'IDEABug.ClassA'; both methods have same erasure, yet neither hides the other">static <T extends String> void sayHello(Collection<? extends T> msg)</error> {}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
ClassB.sayHello(Collections.<String>emptyList());
|
||||
}
|
||||
}
|
||||
@@ -224,6 +224,8 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA18425(){ doTest5(false); }
|
||||
public void testIDEA27080(){ doTest5(false); }
|
||||
public void testIDEA22079(){ doTest5(false); }
|
||||
public void testIDEA21602(){ doTest5(false); }
|
||||
public void testIDEA21602_7(){ doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA27185(){ doTest(LanguageLevel.JDK_1_6, JavaSdkVersion.JDK_1_6, false); }
|
||||
public void testIDEA67571(){ doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user