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/02/08 18:56: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: 4.0.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: 5.0.0-alpha-1, 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.1#820001)