1/* 2 * @test /nodynamiccopyright/ 3 * @bug 8013852 4 * @summary ensure that declaration annotations are not allowed on 5 * wildcards 6 * @author Werner Dietl 7 * @compile/fail/ref=DeclarationAnnotation.out -XDrawDiagnostics DeclarationAnnotation.java 8 */ 9 10import java.lang.annotation.ElementType; 11import java.lang.annotation.Target; 12import java.util.List; 13 14class DeclarationAnnotation { 15 List<@DA ? extends Object> bad; 16 List<@TA ? extends Object> good; 17} 18 19@interface DA { } 20 21@Target(ElementType.TYPE_USE) 22@interface TA { } 23