7d8c3e9460
Diamond oerator should be disallowed on non-generic class types (i.e. String) Reviewed-by: jjg
16 lines
319 B
Java
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");
|
|
}
|
|
}
|