Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-62

implement switch statement

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-2
    • None
    • None

    Description

      Should support this

      switch (foo) {

      // use a regex to match
      case /a|b/:
      ...

      // use a value
      case "hello":
      ...

      // use a list of values
      case ['d', 'e']:
      ...

      // use a type
      case SomeType:
      ...
      }

      Attachments

        Activity

          People

            jstrachan James Strachan
            jstrachan James Strachan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: