1 2 3 4 5 6 7 8 9 10 11 12 13 14
sealed trait Tree case class Let(sth: List[Any]) extends Tree case class Lit(sth: Any) extends Tree object Test { def wroong(tree: Tree) = tree match { case Let(_ :: rest) => ??? case Let(Nil) => ??? // no warning for missing Lit(_) in 2.10 } }