| Other |
|---|
| tbd_majorUnresolved |
|
Relates :
|
|
|
Relates :
|
This began failing with the patch from JDK-8069545.
---
class C<T> {}
<S> C<S> makeC(Function<String,S> f) { return null; }
<T extends Comparable<T>> void eatC(C<T> list) {}
void test() {
eatC(makeC(x->x));
}
---
Expected: compiles, S = T = String
Actual: error:
error: method eatC cannot be applied to given types;
eatC(makeC(x->x));
^
required: C<T>
found: C<Object>
reason: inferred type does not conform to upper bound(s)
inferred: Object
upper bound(s): Comparable<Object>,Object
|