Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.6-rc-1
-
Fix Version/s: 4.0
-
Component/s: Compiler, parser-antlr
-
Labels:None
-
Number of attachments :
Description
Unlike Java, Groovy doesn't support multiple labels on the same statement - instead, the AST builder discards all but the first (!) label:
class MultipleLabels {
static void main(args) {
label1:
label2:
while (true)
}
}
For a discussion see: http://www.nabble.com/Multiple-labels-on-the-same-statement-td21543898.html
Here is a trivial patch to retain the last label instead of the first one, which is already an improvement. For 1.6.1 we can maybe do even better and have full support for multiple labels.