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

implicit 'it' parameter created wrongly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-10
    • Fix Version/s: 1.0-JSR-5
    • Component/s: parser-antlr
    • Labels:
      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

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              jrose John Rose
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: