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
/*
* @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");
}
}