Maurizio Cimadamore 3e65664acf 6995200: JDK 7 compiler crashes when type-variable is inferred from expected primitive type
15.12.2.8 should use boxing when expected type in assignment context is a primitive type

Reviewed-by: jjg
2010-11-23 11:08:43 +00:00

19 lines
466 B
Java

/*
* @test /nodynamiccopyright/
* @bug 6638712
* @author mcimadamore
* @summary Inference with wildcard types causes selection of inapplicable method
* @compile/fail/ref=T6638712a.out -XDrawDiagnostics T6638712a.java
*/
import java.util.*;
class T6638712a {
<T> Comparator<T> compound(Iterable<? extends Comparator<? super T>> it) { return null; }
public void test(List<Comparator<?>> x) {
Comparator<String> c3 = compound(x);
}
}