Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Cannot Reproduce
-
None
-
None
Description
Following code fails
for (i in 1..10)
{ if (i == 5) continue println(i) }Caught: org.codehaus.groovy.syntax.parser.UnexpectedTokenException: expected one of
{ ";", <newline>, or "}" }; found '(' at 4:10
org.codehaus.groovy.syntax.parser.UnexpectedTokenException: expected one of
" }; found '(' at 4:10
at org.codehaus.groovy.syntax.parser.Parser.throwExpected(Parser.java:30 96)
at org.codehaus.groovy.syntax.parser.Parser.endOfStatement(Parser.java:1 60)
at org.codehaus.groovy.syntax.parser.Parser.endOfStatement(Parser.java:1 78)
at org.codehaus.groovy.syntax.parser.Parser.continueStatement(Parser.jav a:1831)
at org.codehaus.groovy.syntax.parser.Parser.statement(Parser.java:1576)
But this works
for (i in 1..10)
{ if (i == 5) continue; println(i) }