Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-5
-
None
Description
class Test {
static main(args) {
c = {
println a // a is resolved on the delegate OK here
[1, 2, 3].each
{ println a // a is not resolved on tghe delegate of the enclosing closure here }}
c.delegate = ['a':10]
c()
}
}
prints 10 and then throws an exception.
within the each closure 'a' is not resolved. This means that the enclosing closure's delegate is not being examined to see if it has the property 'a'.
Attachments
Issue Links
- is depended upon by
-
GROOVY-764 closures
- Closed