Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6-beta-1
-
Fix Version/s: 1.6-rc-1, 1.5.8, 1.7-beta-1
-
Component/s: parser
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
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.
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
-
Activity
Chanwit Kaewkasi
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | Groovy2849Bug.groovy [ 34667 ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 1.6-beta-2 [ 14261 ] | |
| Fix Version/s | 1.5.7 [ 14242 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.5.8 [ 14630 ] | |
| Fix Version/s | 1.6-beta-2 [ 14261 ] | |
| Fix Version/s | 1.5.7 [ 14242 ] |
Roshan Dawrani
made changes -
| Attachment | 2849Patch.zip [ 38123 ] |
Roshan Dawrani
made changes -
| Attachment | Groovy2849Bug_v2.groovy [ 38126 ] |
Roshan Dawrani
made changes -
| Attachment | Groovy2849BugAST.groovy.xml [ 38142 ] |
Roshan Dawrani
made changes -
| Attachment | 2849Patch.zip [ 38123 ] |
Roshan Dawrani
made changes -
| Attachment | Groovy2849Bug_v2.groovy [ 38126 ] |
Roshan Dawrani
made changes -
| Attachment | 2849Patch_v2.zip [ 38159 ] |
Roshan Dawrani
made changes -
| Attachment | Groovy2849Bug_v2.groovy [ 38160 ] |
blackdrag blackdrag
made changes -
| Link |
This issue is depended upon by |
blackdrag blackdrag
made changes -
| Assignee | Jochen Theodorou [ blackdrag ] | Roshan Dawrani [ roshandawrani ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 1.7-beta-1 [ 14014 ] | |
| Fix Version/s | 1.6-rc-1 [ 14009 ] |
Roshan Dawrani
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |