Groovy
  1. Groovy
  2. GROOVY-772

implicit 'it' parameter created wrongly

    Details

    • Type: Bug Bug
    • Status: 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

      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

        John Rose created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Fix Version/s 1.0-JSR-2 [ 11517 ]
        Fix Version/s 1.0-JSR-1 [ 10964 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.0-JSR-2 [ 11517 ]
        Fix Version/s 1.0-JSR-3 [ 11518 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.0-JSR-3 [ 11518 ]
        Fix Version/s 1.0-JSR-4 [ 11905 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.0-JSR-4 [ 11905 ]
        Fix Version/s 1.0-JSR-5 [ 12102 ]
        Jochen Theodorou made changes -
        Assignee Jochen Theodorou [ blackdrag ]
        Jochen Theodorou made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12729926 ] Default workflow, editable Closed status [ 12741948 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12968458 ] Default workflow, editable Closed status [ 12976200 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development