Closed
Description
reproduction steps
minimized code:
object Test {
sealed trait Base
class Blub extends Base
object Blub {
def unapply(blub: Blub): Some[(Int, blub.type)] =
Some(1 -> blub)
}
(null: Base) match {
case Blub(i, x) => println(i)
}
}
problem
Expect everything to compile without warnings, but gives
match may not be exhaustive.
It would fail on pattern case: Blub(_, _)
(null: Base) match {
If the dependent type is removed or (null: Blub)
used, the warning will go away