Thu, 21 Feb 2013 14:43:51 -0800
8008405: Now that metafactory is in place, add javac lambda serialization tests
Summary: Tests part of original langtools serialization review.
Reviewed-by: mcimadamore
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 6939780 7020044
4 *
5 * @summary add a warning to detect diamond sites
6 * @author mcimadamore
7 * @compile/ref=T6939780.out T6939780.java -XDrawDiagnostics -XDfindDiamond
8 *
9 */
11 class T6939780 {
13 void test() {
14 class Foo<X extends Number> {
15 Foo() {}
16 Foo(X x) {}
17 }
18 Foo<Number> f1 = new Foo<Number>(1);
19 Foo<?> f2 = new Foo<Number>();
20 Foo<?> f3 = new Foo<Integer>();
21 Foo<Number> f4 = new Foo<Number>(1) {};
22 Foo<?> f5 = new Foo<Number>() {};
23 Foo<?> f6 = new Foo<Integer>() {};
24 }
25 }