Sat, 07 Nov 2020 10:30:02 +0800
Added tag mips-jdk8u275-b01 for changeset eb6ee6a5f2fe
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 6843077 6919944 8006775 |
aoqi@0 | 4 | * @summary check for duplicate annotation values |
aoqi@0 | 5 | * @author Mahmood Ali |
aoqi@0 | 6 | * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics DuplicateAnnotationValue.java |
aoqi@0 | 7 | */ |
aoqi@0 | 8 | import java.lang.annotation.*; |
aoqi@0 | 9 | class DuplicateAnnotationValue { |
aoqi@0 | 10 | void test() { |
aoqi@0 | 11 | String @A(value = 2, value = 1) [] s; |
aoqi@0 | 12 | } |
aoqi@0 | 13 | } |
aoqi@0 | 14 | |
aoqi@0 | 15 | @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) |
aoqi@0 | 16 | @interface A { int value(); } |