-1:000000000000 | 0:959103a6100f |
---|---|
1 /* | |
2 * @test /nodynamiccopyright/ | |
3 * @bug 1234567 | |
4 * @summary ensure that declaration annotations are not allowed on | |
5 * new array expressions | |
6 * @author Werner Dietl | |
7 * @compile/fail/ref=DeclarationAnnotation.out -XDrawDiagnostics DeclarationAnnotation.java | |
8 */ | |
9 class DeclarationAnnotation { | |
10 Object e1 = new @DA int[5]; | |
11 Object e2 = new @DA String[42]; | |
12 Object e3 = new @DA Object(); | |
13 Object ok = new @DA Object() { }; | |
14 } | |
15 | |
16 @interface DA { } |