capture conversion: ensure captured wildcards are not replaced after creation, so substitution is consistent; at the same time ensure that "?" with upper bound Runnable is equivalent to "? extends Runnable"

This commit is contained in:
Anna Kozlova
2015-05-28 19:42:11 +02:00
parent 719bfffcae
commit cdb50293f2
14 changed files with 57 additions and 20 deletions
@@ -6,6 +6,6 @@ interface B<T extends Cloneable> {
class D {
void bar(B<?> x, List<?> y) {
x.foo<error descr="'foo(java.util.List<? super capture<? extends java.lang.Cloneable>>)' in 'B' cannot be applied to '(java.util.List<capture<?>>)'">(y)</error>;
x.foo<error descr="'foo(java.util.List<? super capture<?>>)' in 'B' cannot be applied to '(java.util.List<capture<?>>)'">(y)</error>;
}
}