groovy
  1. groovy
  2. GROOVY-772

implicit 'it' parameter created wrongly

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-10
    • Fix Version/s: 1.0-JSR-5
    • Component/s: parser-antlr
    • Labels:
      None
    • Number of attachments :
      0

      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.

        Activity

        Hide
        blackdrag blackdrag added a comment -

        fixed now

        Show
        blackdrag blackdrag added a comment - fixed now

          People

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

            Dates

            • Created:
              Updated:
              Resolved: