Fri, 18 Feb 2011 12:28:49 +0000
7020043: Project Coin: diamond allowed on non-generic type
Summary: Diamond oerator should be disallowed on non-generic class types (i.e. String)
Reviewed-by: jjg
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 7020043
4 *
5 * @summary Project Coin: diamond allowed on non-generic type
6 * @author Rémi Forax
7 * @compile/fail/ref=Neg12.out Neg12.java -XDrawDiagnostics
8 *
9 */
11 class DiamondRaw {
12 public static void main(String[] args) {
13 String s = new String<>("foo");
14 }
15 }