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

implicit 'it' parameter created wrongly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-beta-10
    • 1.0-JSR-5
    • parser-antlr2
    • None

    Description

      The closures {:: y} and

      {y}

      have different semantics, but the present system treats them the same, giving both an implicit parameter list of (it = null). A closure with an explicit empty parameter list should not get it changed to another parameter list, because the user has explicitly specified one.

      Suggested fix: Move the logic to create the (it = null) list into the Antlr parser plugin, and respect the different between PARAMETERS and IMPLICIT_PARAMETERS at that transformation point.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            jrose Jon Rose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: