langtools/test/tools/javac/annotations/typeAnnotations/failures/common/arrays/DeclarationAnnotation.java
author jlahoda
Tue, 03 Dec 2013 18:50:26 +0100
changeset 22003 ed437c411fbd
parent 17578 46ac954e4a84
child 24292 12414a72f8d2
permissions -rw-r--r--
8028699: Compiler crash during speculative attribution of annotated type Summary: Moving the checkForDeclarationAnnotations check into Attr.TypeAnnotationsValidator Reviewed-by: jjg Contributed-by: wdietl@gmail.com

/*
 * @test /nodynamiccopyright/
 * @bug 1234567
 * @summary ensure that declaration annotations are not allowed on
 *   new array expressions
 * @author Werner Dietl
 * @compile/fail/ref=DeclarationAnnotation.out -XDrawDiagnostics DeclarationAnnotation.java
 */
class DeclarationAnnotation {
    Object e1 = new @DA int[5];
    Object e2 = new @DA String[42];
    Object e3 = new @DA Object();
    Object ok = new @DA Object() { };
}

@interface DA { }