We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92dfdf7 commit 3cc6559Copy full SHA for 3cc6559
tests/neg/i3332.scala
@@ -1,7 +1,7 @@
1
object Main {
2
def main(args: Array[String]): Unit = {
3
(1: Any) match {
4
- case x: String | Int => "OK"
+ case x: String | Int => "OK" // error: Illegal variable in pattern alternative
5
case (_: String) | (_: Int) => "OK"
6
case (s: String) | _: Int => s // error: Illegal variable in pattern alternative
7
}
0 commit comments