Skip to content

Commit 256ab15

Browse files
committed
Fix #692: Move testcase to neg-no-optimise/
I don't think the `def run` in the original testcase should work given that the added `def run2` doesn't in either scalac or dotty. The testcase is in neg-no-optimise because of #3805.
1 parent 209ac19 commit 256ab15

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/neg-no-optimise/t7868.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
case _ =>
12+
}
13+
}

tests/pending/run/t7868.scala

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)