You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/01/27 10:09:00 UTC
[jira] [Updated] (GROOVY-4339) Compiler first allows an annotation
on a statement, then fails with a weird error message
[ https://issues.apache.org/jira/browse/GROOVY-4339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-4339:
------------------------------
Fix Version/s: (was: 3.x)
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
> Fix For: 4.x
>
>
> {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.3.4#803005)