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

Incorrect handling of particular case statements within switch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.2, 2.5.11
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: