Closed
Description
Compiler version
3.2.2
Minimized code
sealed trait Unset
def foo(v: Unset|Option[Int]): Unit = v match
case v: Unset => ()
case v: Option[Int] => ()
Output
the type test for Option[Int] cannot be checked at runtime
Expectation
No warning. Unset is sealed trait and therefore this match should be exhaustive. For example, v: String|Option[Int]
compiles without warning.