Replace
case MorrisBoard.RING.OUT:
with
So this will really be a constant as in “determined at compilation”.
The specification precises that a “SwitchLabel” must be
case
followed by a constant expressioncase
followed by the name of an enum value- or
default
What is considered a valid constant expression is described here in the specification. It’s fairly limited.