Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-beta-1
-
None
Description
I guess this may be a parser bug (I'm not sure).
This class is working fine:
private class TestClosure {
def test = 1
def c1 = {
def test = 2
def c2 =
c2()
}
}
new TestClosure().c1()
But when we change:
def c2 =
{ println this.test this.test+=10 println this.test test = 3 }then thing is screwed up.
'this.test' is resolved to be 'test' of the c1 closure, which is not correct.
Attachments
Attachments
Issue Links
- is depended upon by
-
GROOVY-3156 Within a nested closure, "this.method()" works incorrectly if parent closure and outermost class have closures/methods of the same name
- Closed