T6939780.java revision 730
2N/A/*
2N/A * @test /nodynamiccopyright/
2N/A * @bug 6939780
2N/A *
2N/A * @summary add a warning to detect diamond sites
2N/A * @author mcimadamore
2N/A * @compile/ref=T6939780.out T6939780.java -XDrawDiagnostics -XDfindDiamond
2N/A *
2N/A */
2N/A
2N/Aclass T6939780 {
2N/A
2N/A void test() {
2N/A class Foo<X extends Number> {
2N/A Foo() {}
2N/A Foo(X x) {}
2N/A }
2N/A Foo<Number> f1 = new Foo<Number>(1);
2N/A Foo<?> f2 = new Foo<Number>();
2N/A Foo<?> f3 = new Foo<Integer>();
2N/A Foo<Number> f4 = new Foo<Number>(1) {};
2N/A Foo<?> f5 = new Foo<Number>() {};
2N/A Foo<?> f6 = new Foo<Integer>() {};
2N/A }
2N/A}
2N/A