Jochen Theodorou
added a comment - 17/Jul/08 08:11 that
case ' return labelled closure': // compiles (should it?)
return
label: { // either unreachable or a 'labelled' closure
x ->
condition + ': was here'
}
break
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)
break
I 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.