Maurizio Cimadamore 7d8c3e9460 7020043: Project Coin: diamond allowed on non-generic type
Diamond oerator should be disallowed on non-generic class types (i.e. String)

Reviewed-by: jjg
2011-02-18 12:28:49 +00:00

16 lines
319 B
Java

/*
* @test /nodynamiccopyright/
* @bug 7020043
*
* @summary Project Coin: diamond allowed on non-generic type
* @author Rémi Forax
* @compile/fail/ref=Neg12.out Neg12.java -XDrawDiagnostics
*
*/
class DiamondRaw {
public static void main(String[] args) {
String s = new String<>("foo");
}
}