Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.6-beta-1
-
Fix Version/s: 1.8.x
-
Component/s: None
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
Please look a the attached file. I think it reveals a couple of problems with the Groovy syntax parser and Groovy's runtime behaviour.
However, I don't know if the spec makes any restrictions on the placement of curly braces.
that
compiles is ok, it is still a closure, but the place it is defined is labeled... well.. something we do not need, but it is more complicated to forbid that.
as for
{ x -> println condition + ': was here' }.call(condition) breakI am not sure why this does not compile... probably missing whitespace eating...
None of these issues are special to switch-case, they should happen like this anywhere in the code.