aboutsummaryrefslogtreecommitdiff
path: root/tests/patmat/t7669.scala
blob: 3aa74129ed9bad90c5af579121078ec9f01b25f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
object Test {

  sealed abstract class Expr
  // Change type of `arg` to `Any` and the exhaustiveness warning
  // is issued below
  case class Op(arg: Expr) extends Expr
  case class NotHandled(num: Double) extends Expr


  def exhausto(expr: Expr): Unit = expr match {
    case Op(Op(_)) =>
    case Op(_) =>
  }
}