Closed
Description
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.