## Minimized code ```Scala package bugreport sealed trait Foo[+A] case class Bar[A]() extends Foo[A] def bugReport[A](foo: Foo[A]): Foo[A] = foo match { case bar: Bar[A] => bar } ``` ## Output ``` [warn] -- Warning: [warn] 8 | case bar: Bar[A] => bar [warn] | ^^^^^^^^^^^ [warn] | the type test for bugreport.Bar[A] cannot be checked at runtime ``` ## Expectation There should be no warning. ## Additional information - There was no warning in dotty 0.24.0-RC1 - There is no warning if type parameter `A` is covariant in `Bar`