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
I did my best to find the corresponding issue, but I couldn't pinpoint it. Here's what happens:
$ cat Test.scala
packagetestsealedtraitTreecaseclassLet(sth: List[Any]) extendsTreecaseclassLit(sth: Any) extendsTreeobjectTest {
defwroong(tree: Tree) =
tree match {
caseLet(_ :: rest) =>???caseLet(Nil) =>???// no warning for missing Lit(_) in 2.10
}
}
$ scalac210 -version
Scala compiler version 2.10.4-20140209-180020-b66a39653b --Copyright2002-2013, LAMP/EPFL
$ scalac210 Test.scala
$ scalac210 -XoldpatmatTest.scala #using the old pattern matcher
Test.scala:10:warning: match is not exhaustive!
missing combination Lit
tree match {
^
one warning found
$ scalac211 -version
Scala compiler version 2.11.0-20140227-142303-fabc9f1424 --Copyright2002-2013, LAMP/EPFL
$ scalac211 Test.scala
Test.scala:10:warning: match may not be exhaustive.
It would fail on the following input: Lit(_)
tree match {
^
one warning found
Yet, when I join the two cases, the warning appears:
$ cat Test2.scala
packagetestsealedtraitTreecaseclassLet(sth: List[Any]) extendsTreecaseclassLit(sth: Any) extendsTreeobjectTest {
defookay(tree: Tree) =
tree match {
caseLet(_) =>???// missing Lit(_) warning in both 2.10 and 2.11
}
}
$ scalac Test2.scala
Test2.scala:10:warning: match may not be exhaustive.
It would fail on the following input: Lit(_)
tree match {
^
one warning found
The text was updated successfully, but these errors were encountered:
Just to clarify, it regressed in Scala 2.10.0 and the regression is still presented in 2.10.4-RC3. The issue is fixed in Scala 2.11.0-RC1 so I'm closing it.
I did my best to find the corresponding issue, but I couldn't pinpoint it. Here's what happens:
Yet, when I join the two cases, the warning appears:
The text was updated successfully, but these errors were encountered: