equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * @test /nodynamiccopyright/ |
2 * @test /nodynamiccopyright/ |
3 * @bug 6939780 7020044 8009459 |
3 * @bug 6939780 7020044 8009459 8021338 |
4 * |
4 * |
5 * @summary add a warning to detect diamond sites |
5 * @summary add a warning to detect diamond sites |
6 * @author mcimadamore |
6 * @author mcimadamore |
7 * @compile/ref=T6939780_7.out -Xlint:-options -source 7 T6939780.java -XDrawDiagnostics -XDfindDiamond |
7 * @compile/ref=T6939780_7.out -Xlint:-options -source 7 T6939780.java -XDrawDiagnostics -XDfindDiamond |
8 * @compile/ref=T6939780_8.out T6939780.java -XDrawDiagnostics -XDfindDiamond |
8 * @compile/ref=T6939780_8.out T6939780.java -XDrawDiagnostics -XDfindDiamond |
34 gw(new Foo<Integer>() {}); |
34 gw(new Foo<Integer>() {}); |
35 } |
35 } |
36 |
36 |
37 void gw(Foo<?> fw) { } |
37 void gw(Foo<?> fw) { } |
38 void gn(Foo<Number> fn) { } |
38 void gn(Foo<Number> fn) { } |
|
39 |
|
40 static class Foo2<X> { |
|
41 X copy(X t) { |
|
42 return t; |
|
43 } |
|
44 } |
|
45 |
|
46 void testReciever() { |
|
47 Number s = new Foo2<Number>().copy(0); |
|
48 } |
|
49 |
39 } |
50 } |