test/tools/javac/generics/diamond/neg/Neg08.java

Mon, 24 Jan 2011 15:44:51 +0000

author
mcimadamore
date
Mon, 24 Jan 2011 15:44:51 +0000
changeset 829
ce6175cfe11e
parent 537
9d9d08922405
child 914
ca32f2986301
permissions
-rw-r--r--

6968793: issues with diagnostics
Summary: several diagnostic improvements
Reviewed-by: jjg

mcimadamore@537 1 /*
mcimadamore@537 2 * @test /nodynamiccopyright/
mcimadamore@537 3 * @bug 6939620 6894753
mcimadamore@537 4 *
mcimadamore@537 5 * @summary Switch to 'complex' diamond inference scheme
mcimadamore@537 6 * @author mcimadamore
mcimadamore@537 7 * @compile/fail/ref=Neg08.out Neg08.java -XDrawDiagnostics
mcimadamore@537 8 *
mcimadamore@537 9 */
mcimadamore@537 10
mcimadamore@537 11 class Neg08 {
mcimadamore@537 12 static class Foo<X> {
mcimadamore@537 13 Foo(X x) { }
mcimadamore@537 14 }
mcimadamore@537 15
mcimadamore@537 16 static class DoubleFoo<X,Y> {
mcimadamore@537 17 DoubleFoo(X x,Y y) { }
mcimadamore@537 18 }
mcimadamore@537 19
mcimadamore@537 20 static class TripleFoo<X,Y,Z> {
mcimadamore@537 21 TripleFoo(X x,Y y,Z z) { }
mcimadamore@537 22 }
mcimadamore@537 23
mcimadamore@537 24 Foo<? extends Integer> fi = new Foo<>(1);
mcimadamore@537 25 Foo<?> fw = new Foo<>(fi);
mcimadamore@537 26 Foo<? extends Double> fd = new Foo<>(3.0);
mcimadamore@537 27 DoubleFoo<?,?> dw = new DoubleFoo<>(fi,fd);
mcimadamore@537 28 Foo<String> fs = new Foo<>("one");
mcimadamore@537 29 TripleFoo<?,?,?> tw = new TripleFoo<>(fi,fd,fs);
mcimadamore@537 30 }

mercurial