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

Allow for-each iteration without types

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1-beta-2
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None

      Description

      I would like to write

      for (v : collection) {
      System.out.println(v);
      }

      However, Groovy complains when I do this
      Java-style for-each statement requires a type declaration

      It seems to me that there's no reason to require this restriction, granting that there are probably more natural Groovy idioms for doing this kind of thing.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rbodkin Ron Bodkin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: