Open
Description
Compiler version
3.7.1
Minimized code
case class Test()
object Test {
def unapply(int: Test): Some[Seq[Int]] = Some(Seq(1, 2))
}
@main
def run = {
Test() match {
case Test(x*) => println(x)
}
}
Output
Compiles, runs and prints List(1, 2)
, but has the following warning:
match may not be exhaustive.
It would fail on pattern case: Test(_)
Test() match {
Expectation
The compiler should not emit any error because of the exhaustive check.