test/tools/javac/generics/diamond/neg/Neg12.java

Fri, 18 Feb 2011 12:28:49 +0000

author
mcimadamore
date
Fri, 18 Feb 2011 12:28:49 +0000
changeset 881
4ce95dc0b908
permissions
-rw-r--r--

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 }

mercurial