mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +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";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user