Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-9
-
None
-
None
-
windows xp + cygwin, sun jdk 1.5.0_01-b08
Description
This small test script illustrates the problem:
- begin script
def ctest()Unknown macro: { a = -1 cl1 = { a = 2 }
cl1()
println "a is now: ${a}"
a = -1
cl2 = {
cl3 = { a = 2 } cl3() }cl2()
println "a is now: ${a}"
}
ctest()
- end script
Running the code above produces:
a is now: 2
a is now: -1
It should have changed a to 2 both times. It may be non-obvious
from this trivial test script, but the situation occurs frequently
enough to be a significant obstacle to development. Workaround is
to refactor code so that it never has more than one nesting level.