Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6
-
None
Description
import java.lang.annotation.Retention import java.lang.annotation.RetentionPolicy @Retention(RetentionPolicy.RUNTIME) @interface Foo { String x() } @Foo // compiler should not allow this, because there is no default value for x class Bar {} def anno = Bar.class.getAnnotation(Foo) anno.x() // java.lang.annotation.IncompleteAnnotationException: Foo missing element x
Attachments
Attachments
Issue Links
- relates to
-
GROOVY-6705 Compiler Doesn't Enforce Required Annotation Attributes
- Closed