Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-214

nested closures seem to have a problem with variable passing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-4
    • None
    • None

    Description

      The following doesn't seem to work...

      x = 123
      new File("output.txt").withWriter { out |
      new File("input.txt").eachLine

      { line | out.write(line) out.write(x) out.newline() }

      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jstrachan James Strachan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: