subtyping constraint: apply capture conversion for captured wildcard bound according to the direct supertype of parameterized type specification

This commit is contained in:
Anna Kozlova
2016-06-22 15:24:15 +03:00
parent a330f9c2f7
commit 3805d51554
4 changed files with 23 additions and 1 deletions
@@ -0,0 +1,14 @@
import java.util.List;
class Test {
void f(List<? extends I<?>> list) {
foo(list.get(0));
}
private <T> T foo(I<T> id) {
return null;
}
interface I<Z> {
}
}