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 2022/07/23 16:20:00 UTC

[jira] [Updated] (GROOVY-8448) Local variable is accessible via explicit this

     [ https://issues.apache.org/jira/browse/GROOVY-8448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles updated GROOVY-8448:
--------------------------------
    Fix Version/s:     (was: 5.0.0-alpha-1)

> Local variable is accessible via explicit this
> ----------------------------------------------
>
>                 Key: GROOVY-8448
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8448
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.13
>            Reporter: Daniil Ovchinnikov
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 2.5.16, 3.0.10, 4.0.1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {code:groovy}
> def var = "local var"
> new Runnable() {
>   def getVar() { "getter" }
>   void run() {
>     println var // as expected: local var
>     println this.var // expected: getter, actual: local var
>   }
> }.run()
> {code}



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