groovy
  1. groovy
  2. GROOVY-3298

Support multiple labels on the same statement

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6-rc-1
    • Fix Version/s: 2.4.0-beta-3
    • Component/s: Compiler, parser-antlr
    • Labels:
      None
    • Number of attachments :
      1

      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)

      { break label1 // OK break label2 // Compile error: "break to missing label" }


      }
      }

      For a discussion see: http://www.nabble.com/Multiple-labels-on-the-same-statement-td21543898.html

        Activity

          People

          • Assignee:
            Paul King
            Reporter:
            Peter Niederwieser
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: