aboutsummaryrefslogtreecommitdiff
path: root/tests/patmat/t9677.scala
blob: 1e9b1df5e891d450f5b006e7e89424e4441319dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
sealed abstract class Base

sealed trait A extends Base

object A {

  case object Root extends Base

  def apply(param: String): A = {
      new A {}
  }
}

object ExhaustiveMatchWarning {

  def test: Unit = {
    val b: Base = A("blabla")
    b match {
      case A.Root => println("Root")
      case path: A => println("Not root")
    }
  }
}