A break-free switch (without fallthrough behavior).
Unlike 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.)
Linear Supertypes
Serializable, java.io.Serializable, Product, Equals, Tree, AnyRef, Any
A break-free switch (without fallthrough behavior). Unlike 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.)