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

Incorrect handling of particular case statements within switch

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.2, 2.5.11
    • Component/s: None
    • Labels:
      None

      Description

      As per the comment from the cloned issue, there was a regression caused by the previous fix.
      To summarise: if a case statement has a break and no other statement and the switch is the last statement in a method, a cast exception occurs.
      Workarounds: add any dummy statement to the case statement before the break or any dummy statement after the switch.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                paulk Paul King
                Reporter:
                d.wilmer.1980 Daniel Wilmer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: