[
https://issues.apache.org/jira/browse/GROOVY-4339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-4339:
--------------------------------
Fix Version/s: (was: 4.x)
> Compiler first allows an annotation on a statement, then fails with a weird
> error message
> -----------------------------------------------------------------------------------------
>
> Key: GROOVY-4339
> URL: https://issues.apache.org/jira/browse/GROOVY-4339
> Project: Groovy
> Issue Type: Bug
> Components: class generator
> Reporter: Roshan Dawrani
> Priority: Minor
>
> {code}
> int i
> @Deprecated
> i = 2
> {code}
> Snippet above fails with
> {noformat}
> _.groovy: 4: The current scope already contains a variable of the name i
> @ line 4, column 1.
> i = 2
> {noformat}
> It should better say that an annotation is not allowed/handled where it is
> specified.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)