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
Including a case class with varargs in the constructor seems to prevent exhaustiveness checking from happening.
sealedtraitFailscaseclassVarArgs1(a: String*) extendsFailscaseclassFailsChild2(a: Seq[String]) extendsFailsobjectFailsTest {
defmatchOnVarArgsFirstFails(f: Fails) {
f match {
caseVarArgs1(_) =>???// BUG: Without this line we should get a non-exhaustive match compiler error. //case FailsChild2(_) => ???
}
}
defmatchOnSeqArgsFirstWorks(f: Fails) {
f match {
caseFailsChild2(_) =>???// Without this line, the compiler reports a "match may not be exhaustive" error as expected.caseVarArgs1(_) =>???
}
}
}
sealedtraitWorkscaseclassSeqArgs1(a: Seq[String]) extendsWorkscaseclassSeqArgs2(a: Seq[String]) extendsWorksobjectWorksTest {
defmatcher(f: Works) {
f match {
caseSeqArgs1(_) =>???// Without this line, the compiler reports a "match may not be exhaustive" error as expected.caseSeqArgs2(_) =>???
}
}
}
The text was updated successfully, but these errors were encountered:
Including a case class with varargs in the constructor seems to prevent exhaustiveness checking from happening.
The text was updated successfully, but these errors were encountered: