Description
First mentioned on the mailing list:
Trying to debug this script:
def current = 1
next = 1
10.times {
print current + ' '
newCurrent = next
next = next + current
current = newCurrent
}
println ''
Set a breakpoint inside the closure and try to evaluate next. It is an error. The problem is that we are not properly looking up variables defined in the outer scope of a closure.