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
- is a clone of
-
GROOVY-9424 Incorrect handling of final variables within switch
- Closed
- is duplicated by
-
GROOVY-9482 Problem with empty case in switches when not in last position
- Closed