case classMatch(selector: Tree, cases: List[(List[Literal], Tree)], default: Tree)(tpe: Type)(implicit pos: Position) extends Tree with Product with Serializable
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.)
Linear Supertypes
Serializable, Serializable, Product, Equals, Tree, AnyRef, Any
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.)