Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
Description
import groovy.xml.StreamingMarkupBuilder
def doc = new StreamingMarkupBuilder().bind {
root {
1..2.each
}
}
System.out << doc
fails as item is not resolved.
This is because the owner of the each closure has been set to the script. The owner should be the colsure passed to the root method.