langtools/test/tools/javac/generics/inference/6638712/T6638712a.java
author mcimadamore
Tue, 23 Nov 2010 11:08:43 +0000
changeset 7331 02ffc087c654
parent 3766 7e2df99e9223
permissions -rw-r--r--
6995200: JDK 7 compiler crashes when type-variable is inferred from expected primitive type Summary: 15.12.2.8 should use boxing when expected type in assignment context is a primitive type Reviewed-by: jjg

/*
 * @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);
    }
}