Skip to content

Missing validation on annotation scope #43

@GoogleCodeExporter

Description

@GoogleCodeExporter
The following code:

package test {

    [Retention(RetentionPolicy.RUNTIME)]
    [Target({ ElementType.FIELD })]
    public interface EnumCode : Annotation {
        int value();
    }

    [EnumCode(1)]
    public enum Codes {

        [EnumCode(1)]
        Code1,

        [EnumCode(2)]
        Code2
    }
}

does not validate the scope of the annotation, since it is declared only to be 
valid on field types, not on classes.



Original issue reported on code.google.com by [email protected] on 28 Feb 2011 at 9:43

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions