Closed
Description
Compiler version
3.0.0-RC2
Minimized code
def test[A, B](a: A|B)(using reflect.TypeTest[Any, A], reflect.TypeTest[Any, B]) =
a match { // WARNING: match may not be exhaustive. It would fail on pattern case: _: A, _: B
case a: A =>
case b: B =>
}
Output
match may not be exhaustive. It would fail on pattern case: _: A, _: B
Expectation
Should not warn.
A call to TypeTest.unapply
should match all A
as an a: A
would if A
was concrete, therefore it covers the type A
. Same for B
.