You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traitBox[+T]
caseclassFoo[+S](s: S) extendsBox[S]
defunwrap2[A](b: Box[A]):A=
b matchcase_: Foo[Int] =>0// compiles, not ok
Output
Compiles with no warning, which is not OK.
Expectation
At least a warning about a pattern that cannot be checked at runtime should be emitted. The code shouldn't typecheck as well, but that's a secondary problem.