A break-free switch (without fallthrough behavior).
Unlike a JavaScript switch, it can be used in expression position.
It supports alternatives explicitly (hence the List[Tree] in cases),
whereas in a switch one would use the fallthrough behavior to
implement alternatives.
(This is not a pattern matching construct like in Scala.)
A break-free switch (without fallthrough behavior). Unlike a JavaScript switch, it can be used in expression position. It supports alternatives explicitly (hence the List[Tree] in cases), whereas in a switch one would use the fallthrough behavior to implement alternatives. (This is not a pattern matching construct like in Scala.)