test/langtools/tools/javac/generics/diamond/neg/Neg18.java
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 29776 langtools/test/tools/javac/generics/diamond/neg/Neg18.java@984a79b71cfe
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse

/*
 * @test /nodynamiccopyright/
 * @bug 8062373
 * @summary Test that inaccessible vararg element type triggers an error during diamond inferred anonymous class instance creation.
 * @compile/fail/ref=Neg18.out Neg18.java -XDrawDiagnostics
 */

import java.util.Collections;
import pkg.Neg18_01;

class Neg18 {

   public static void main(String[] args) {
        new Neg18_01<>() {};
   }
}