langtools/test/tools/javac/generics/inference/6638712/T6638712c.java
author jjg
Thu, 27 Aug 2009 11:08:27 -0700
changeset 3766 7e2df99e9223
parent 3140 15a274b13051
permissions -rw-r--r--
6875336: some tests should use /nodynamiccopyright/ Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3140
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     1
/*
3766
7e2df99e9223 6875336: some tests should use /nodynamiccopyright/
jjg
parents: 3140
diff changeset
     2
 * @test /nodynamiccopyright/
3140
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     3
 * @bug     6638712 6707034
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     4
 * @author  mcimadamore
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     5
 * @summary Inference with wildcard types causes selection of inapplicable method
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     6
 * @compile/fail/ref=T6638712c.out -XDrawDiagnostics T6638712c.java
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     7
 */
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     8
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
     9
import java.util.*;
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    10
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    11
class T6638712c {
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    12
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    13
    <T> T sort(T[] a, Comparator<? super T> c) { return null; }
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    14
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    15
    void test(Enum[] e, Comparator<Enum<?>> comp) {
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    16
        sort(e, comp);
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    17
    }
15a274b13051 6638712: Inference with wildcard types causes selection of inapplicable method
mcimadamore
parents:
diff changeset
    18
}