You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/01/10 16:12:00 UTC

[jira] [Created] (GROOVY-10900) Local variable annotations not available through accessed variable

Eric Milles created GROOVY-10900:
------------------------------------

             Summary: Local variable annotations not available through accessed variable
                 Key: GROOVY-10900
                 URL: https://issues.apache.org/jira/browse/GROOVY-10900
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles


Consider the following:
{code:groovy}
@Deprecated def object = null
@Deprecated def (int i, Number n) = list
{code}

Any {{VariableExpression}} reference to "object", "i" or "n" later in the block cannot look back through accessedVariable and determine the annotations of the declaration.  That is, the {{DeclarationExpression}} instances carry the annotations and the 3 {{VariableExpression}} instances within do not have annotations.

Should the annotations be moved to the variable expression(s)?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)