blob: 1e9b1df5e891d450f5b006e7e89424e4441319dc (
plain) (
tree)
|
|
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")
}
}
}
|