Summary: | Compiler accepts illegally placed annotation. | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Brian Miller <bmiller> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | minor | ||
Priority: | P3 | CC: | martinae |
Version: | 3.2 | ||
Target Milestone: | 3.2 M3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Brian Miller
2005-09-29 11:08:36 EDT
Interesting. Looking at the Language Specification, I can't find anything that would not allow this. Local variables can be associated modifiers, and thus are eligible for annotations. Grammar spec says: EnhancedForStatement: for ( VariableModifiersopt Type Identifier: Expression) Statement VariableModifiers: VariableModifier VariableModifiers VariableModifier VariableModifier: one of final Annotation An annotation placed on a local variable is not persisted in the .class file, but it is perfectly fine in the source. |