langtools/test/tools/javac/generics/diamond/neg/Neg18.java
changeset 29776 984a79b71cfe
equal deleted inserted replaced
29775:dc7df633fea1 29776:984a79b71cfe
       
     1 /*
       
     2  * @test /nodynamiccopyright/
       
     3  * @bug 8062373
       
     4  * @summary Test that inaccessible vararg element type triggers an error during diamond inferred anonymous class instance creation.
       
     5  * @compile/fail/ref=Neg18.out Neg18.java -XDrawDiagnostics
       
     6  */
       
     7 
       
     8 import java.util.Collections;
       
     9 import pkg.Neg18_01;
       
    10 
       
    11 class Neg18 {
       
    12 
       
    13    public static void main(String[] args) {
       
    14         new Neg18_01<>() {};
       
    15    }
       
    16 }