Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 3.0
-
Component/s: class generator
-
Labels:None
-
Number of attachments :
Description
int i
@Deprecated
i = 2
Snippet above fails with
_.groovy: 4: The current scope already contains a variable of the name i @ line 4, column 1. i = 2
It should better say that an annotation is not allowed/handled where it is specified.
Activity
blackdrag blackdrag
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Jochen Theodorou [ blackdrag ] | |
| Fix Version/s | 2.0 [ 13489 ] | |
| Affects Version/s | 1.8-beta-1 [ 16013 ] |
Yes, the annotation (currently) acts as a type placeholder, effectively being the equivalent of def i = 2, which isn't always what would be desired. For an annotation that could appear in both places, I am not sure how we could easily distinguish between the two cases in a backwards compatible way.