Open
Description
Compiler version
3.7.0, 3.7.1-RC1
Minimized code
object Unpack {
final case class Pair(a: Int, b: Int)
def unapply(e: Pair): NamedTuple.NamedTuple[("a", "b"), (Int, Int)] = ???
val x: Pair = ???
x match {
case Unpack(_, _) => ???
}
}
Output
Produces the following warning
-- [E029] Pattern Match Exhaustivity Warning: extractor_namedtuple.scala:6:2 -----------------
6 | x match {
| ^
| match may not be exhaustive.
|
| It would fail on pattern case: Unpack()
|
| longer explanation available when compiling with `-explain`
1 warning found
Expectation
Should compile without warnings.