20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 // key: compiler.err.invalid.inferred.types |
24 // key: compiler.err.invalid.inferred.types |
25 // key: compiler.misc.inferred.do.not.conform.to.params |
25 // key: compiler.misc.inferred.do.not.conform.to.bounds |
26 |
26 |
27 import java.util.*; |
27 import java.util.*; |
28 |
28 |
29 class InvalidInferredTypes { |
29 class InvalidInferredTypes { |
30 |
30 |
31 <T> Comparator<T> compound(Iterable<? extends Comparator<? super T>> it) { |
31 <T extends List<? super T>> T makeList() { |
32 return null; |
32 return null; |
33 } |
33 } |
34 |
34 |
35 public void test(List<Comparator<?>> x) { |
35 public void test() { |
36 Comparator<String> c3 = compound(x); |
36 List<? super String> l = makeList(); |
37 } |
37 } |
38 } |
38 } |