Skip to content

Commit 8817f4c

Browse files
authored
Merge pull request #3800 from dotty-staging/remove-tests
Move some pending tests to neg/
2 parents a532d78 + 256ab15 commit 8817f4c

File tree

5 files changed

+15
-21
lines changed

5 files changed

+15
-21
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/t8764.scala renamed to tests/neg/t8764.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ case class IntOnly(i: Int, j: Int)
33

44
println("IntOnly: should return an unboxed int")
55
val a = IntOnly(1, 2)
6-
val i: Int = a.productElement(0)
6+
val i: Int = a.productElement(0) // error: found Any, required Int
77
println(s"Int: ${a.productElement(0).getClass}")
88

99
case class IntAndDouble(i: Int, d: Double)
1010

1111
println("IntAndDouble: should just box and return Anyval")
1212
val b = IntAndDouble(1, 2.0)
13-
val j: AnyVal = b.productElement(0)
13+
val j: AnyVal = b.productElement(0) // error: found Any, required AnyVal
1414
println(s"Double: ${b.productElement(1).getClass}")
1515
println(s"Int: ${b.productElement(0).getClass}")
1616
}

tests/pending/run/t7868.scala

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

tests/pending/run/t8764.check

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

tests/pending/run/t8764.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)