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
val x: String = "something"
x.foreach {
case 's' => println("s")
case c: Char => println(c)
}
Results in:
[warn] 154 | case c: Char => println(c)
[warn] | ^
[warn] |this will always yield true, since `class Char` is a subclass of `class Char`
While it's true that I can just omit the : Char, the intent here was to increase readability by specifying the type. Feel free to close if this is not a bug but an intended change.