Skip to content

Commit eb9952a

Browse files
committed
Make tests compatible with 2.12
1 parent 4f54266 commit eb9952a

File tree

6 files changed

+7
-45
lines changed

6 files changed

+7
-45
lines changed

tests/neg/t7294.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object Test {
2+
// reachability error as Tuple2 is final.
3+
(1, 2) match { case Seq() => 0; case _ => 1 } // error
4+
}

tests/pos/t5070.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ trait A {
33
}
44

55
object O {
6-
implicit def b(implicit x: A): x.T = error("")
6+
implicit def b(implicit x: A): x.T = sys.error("")
77
}
88

99
class Test {

tests/pos/t7294.scala

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

tests/pos/tcpoly_bounds1.scala

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
class Foo[t[x]<: Tuple2[Int, x]]
2-
3-
//
4-
class MyPair[z](a: Int, b: z) extends Tuple2[Int, z](a,b)
5-
6-
object foo extends Foo[MyPair]
7-
8-
91
trait Monad[m[x <: Bound[x]], Bound[x], a] // TODO: variances!
102
trait ListMonad[a] extends Monad[List, [X] => Any, a] // Dotty difference: Any is not a legal argument for hk type.
113

tests/pos/virtpatmat_exist1.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import annotation.unchecked.{ uncheckedVariance=> uV }
2-
import scala.collection.immutable.{ListMap, HashMap, ListSet, HashSet}
2+
import scala.collection.mutable.{ListMap, HashMap, HashSet}
33

44
object Test {
55
class HashMapCollision1[A, +B](var hash: Int, var kvs: ListMap[A, B @uV]) extends HashMap[A, B @uV]
6-
class HashSetCollision1[A](var hash: Int, var ks: ListSet[A]) extends HashSet[A]
6+
class HashSetCollision1[A](var hash: Int, var ks: Set[A]) extends HashSet[A]
77

88
def splitArray[T](ad: Array[Iterable[T]]): Any =
99
ad(0) match {

tests/run/hashCodeBoxesRunTime.scala

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

0 commit comments

Comments
 (0)