test/tools/javac/diags/examples/InvalidInferredTypes.java

changeset 635
dc550520ed6f
parent 610
3640b60bd0f6
child 1238
e28a06a3c5d9
equal deleted inserted replaced
634:27bae58329d5 635:dc550520ed6f
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 }

mercurial