mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
diamonds: wrong constructor selected (IDEA-123518)
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
import java.util.*;
|
||||
|
||||
class sTest {
|
||||
|
||||
public void shouldCallListConstructor(){
|
||||
List<String>stringList=new ArrayList<String>();
|
||||
ClassUnderTest<Date> cut=new ClassUnderTest<>(stringList);
|
||||
}
|
||||
|
||||
private class ClassUnderTest<T extends Date> {
|
||||
|
||||
public String constructorString;
|
||||
private ClassUnderTest(List<T>stringList) {
|
||||
constructorString="Using List Constructor";
|
||||
}
|
||||
|
||||
private ClassUnderTest(Iterable<String> iterables) {
|
||||
constructorString="Using Iterables Constructor";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -342,6 +342,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA121400() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA123316() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA123352() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA123518() { 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()));
|
||||
|
||||
Reference in New Issue
Block a user