groovy

Use of java iterators in for loop is syntax error

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta-2
  • Fix Version/s: 1.1-rc-1
  • Labels:
    None
  • Number of attachments :
    0

Description

Java supports the use of iterators like so:

for (Iterator i = list.iterator();i.hasNext(){

The above in Groovy causes a compilation error:

unexpected token: )
= list.iterator();i.hasNext(){

but does support with an extra semicolon

for (Iterator i = list.iterator();i.hasNext();

Groovy should support the java syntax

Activity

Hide
blackdrag blackdrag added a comment -

fixed

Show
blackdrag blackdrag added a comment - fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: