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

Unreachable code was not flagged by groovy compiler

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.6
    • Fix Version/s: None
    • Component/s: groovy-jdk
    • Labels:
      None
    • Environment:
      Groovy Version: 2.4.6 JVM: 1.8.0_91 Vendor: Oracle Corporation OS: Windows 10

      Description

      The break statement after return'1' was not flagged as unreachable by groovy

      switch(x) {
      case ['Front', 'Steer']:
          return '1'
          break
      case 'Drive':
          return '2'
      }

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ashishna Ashish
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: