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 209ac19 commit e951e07Copy full SHA for e951e07
tests/neg/t7868.scala
@@ -0,0 +1,13 @@
1
+object A {
2
+ def unapply(n: Int): Option[Int] = Some(n)
3
+
4
+ def run = (0: Short) match {
5
+ case A(_) => // error: this case is unreachable since class Short is not a subclass of class Int
6
+ case _ =>
7
+ }
8
9
+ def run2 = (0: Short) match {
10
+ case x: Int => // error: this case is unreachable since class Short is not a subclass of class Int
11
12
13
+}
tests/pending/run/t7868.scala
0 commit comments