Files
Anna Kozlova dd38082794 least upper bound: pull unbounded wildcard up so types Number & Comparable<? extends Number & Comparable<?>> are produced instead of Number & Comparable<? extends Comparable<?>>
inferred type in bounds check cleanup: accept that inference result is not within its bounds and give the inference the second chance
2015-12-09 11:25:11 +01:00

11 lines
313 B
Java

class Test {
void bar() {
baz<error descr="'baz(S)' in 'Test' cannot be applied to '(java.io.Serializable & java.lang.Comparable<? extends java.io.Serializable & java.lang.Comparable<?>>)'">(foo(1, ""))</error>;
}
<T> T foo(T x, T y) {
return x;
}
<S extends Comparable<S>> void baz(S x) { }
}