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 Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.6.5, 1.7-beta-2
    • Fix Version/s: 4.0
    • Labels:
      None
    • Number of attachments :
      0

      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

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated: