Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.0-JSR-1
-
None
-
None
Description
Consider the following code:
def x = 5
def test() {
x = 6
}
test()
println x
The expected result is 6.
The actual result is 5.
Workaround: use the "this" keyword i.e. this.x = 6
Attachments
Issue Links
- depends upon
-
GROOVY-754 scoping
- Closed