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
Welcome to Scala 3.1.0-RC1-bin-20210818-868906d-NIGHTLY-git-868906d
scala> class C {
| def m(x: true) = x match {
| case true => println("the one true path")
| }
| }
|
// defined class C
-- Warning:
2 | def m(x: true) = x match {
| ^
| match may not be exhaustive.
|
| It would fail on pattern case: false
The warning is spurious; x has a singleton type that isn't taken into account.
This is a regression from Scala 2, where the corresponding bug is scala/bug#11603 and was fixed for Scala 2.13.4 by scala/scala#9209