new inference: avoid resolveGenericMethod on new expressions as diamond types are expanded and cached on class reference (IDEA-133297)

This commit is contained in:
Anna Kozlova
2014-11-25 13:10:38 +01:00
parent 32aad9fc0d
commit 897609bd68
3 changed files with 51 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
import java.util.*;
class Test {
public static void main(String[] args) {
new A<>(new B<>(of("")));
}
static <E> List<E> of(E element) {
return null;
}
static class A<K> {
A(String s) {}
A(B<K> b) {}
}
static class B<T> extends ArrayList<List<T>> {
public B(List<T> l) {}
}
}