test/tools/javac/annotations/typeAnnotations/failures/target/DotClass.java
Print this page
*** 1,15 ****
- import static java.lang.annotation.ElementType.TYPE;
- import static java.lang.annotation.ElementType.TYPE_PARAMETER;
- import static java.lang.annotation.ElementType.TYPE_USE;
-
- import java.lang.annotation.Retention;
- import java.lang.annotation.RetentionPolicy;
- import java.lang.annotation.Target;
-
/*
! * Copyright (c) 2009 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 34,43 ****
--- 26,43 ----
* @summary Class literals are not type uses and cannot be annotated
* @author Werner Dietl
* @compile/fail/ref=DotClass.out -XDrawDiagnostics DotClass.java
*/
+ import java.lang.annotation.Retention;
+ import java.lang.annotation.RetentionPolicy;
+ import java.lang.annotation.Target;
+
+ import static java.lang.annotation.ElementType.TYPE;
+ import static java.lang.annotation.ElementType.TYPE_PARAMETER;
+ import static java.lang.annotation.ElementType.TYPE_USE;
+
@Target({TYPE_USE, TYPE_PARAMETER, TYPE})
@Retention(RetentionPolicy.RUNTIME)
@interface A {}
@interface B { int value(); }