aboutsummaryrefslogblamecommitdiff
path: root/tests/patmat/t8412.scala
blob: f4b2b60907ff17f2cbde574fcbfc512c51eee4b3 (plain) (tree)
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
    }
}