langtools/test/tools/javac/generics/inference/6943278/T6943278.java
author mcimadamore
Mon, 24 Jan 2011 15:44:15 +0000
changeset 8044 7fd529d4472c
permissions -rw-r--r--
6943278: spurious error message for inference and type-variable with erroneous bound Summary: type-inference should ignore erroneous bounds Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8044
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     1
/**
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     3
 * @bug 6943278
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     4
 * @summary spurious error message for inference and type-variable with erroneous bound
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     5
 * @compile/fail/ref=T6943278.out -XDrawDiagnostics -Xlint:unchecked T6943278.java
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     6
 */
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     7
class T6943278<X extends Number & NonExistentInterface> {
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     8
    <X> T6943278<X> m() { return null;}
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
     9
    <X extends Number & NonExistentInterface> T6943278<X> m(X x) { return null;}
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
    10
    T6943278<?> f1 = m();
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
    11
    T6943278<?> f2 = m("");
7fd529d4472c 6943278: spurious error message for inference and type-variable with erroneous bound
mcimadamore
parents:
diff changeset
    12
}