Groovy
  1. Groovy
  2. GROOVY-3898

Allow the specification of types when initializing multiple iteration variables in a "for" construct

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.6.5, 1.7-beta-2
    • Fix Version/s: 4.0
    • Labels:
      None

      Description

      def( int i, int j) = [0,0] works as a stand alone assignment, but it does not work in the initialization portion of a for. For example, while

      for( (i, j)=[0,0]; i<10;

      {i++; j++ }()){ ... }

      compiles

      for( def( int i, int j)=[0,0]; i<10; {i++; j++ }

      ())

      { ... }

      does not.

        Activity

        Ed Clark created issue -
        Jochen Theodorou made changes -
        Field Original Value New Value
        Component/s parser [ 10441 ]
        Component/s parser-antlr [ 11322 ]
        Affects Version/s 1.6.5 [ 15539 ]
        Fix Version/s 1.7-beta-x [ 15538 ]
        Affects Version/s 1.7-beta-2 [ 15540 ]
        Component/s syntax [ 11337 ]
        Jochen Theodorou made changes -
        Fix Version/s 1.7.x [ 15538 ]
        Fix Version/s 1.8.x [ 15750 ]
        Fix Version/s 2.x [ 17013 ]
        Jochen Theodorou made changes -
        Fix Version/s 2.x [ 17013 ]
        Fix Version/s 4.0 [ 18928 ]
        Fix Version/s 1.8.x [ 15750 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12732864 ] Default workflow, editable Closed status [ 12744703 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12970594 ] Default workflow, editable Closed status [ 12978313 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Ed Clark
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development