diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos-scala2/typerep-stephane.scala (renamed from tests/pos/typerep-stephane.scala) | 0 | ||||
-rw-r--r-- | tests/pos-scala2/viewtest1.scala (renamed from tests/pos/viewtest1.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t0786.scala | 2 | ||||
-rw-r--r-- | tests/run/iterator-from.scala | 6 | ||||
-rw-r--r-- | tests/run/t8280.scala | 6 |
5 files changed, 8 insertions, 6 deletions
diff --git a/tests/pos/typerep-stephane.scala b/tests/pos-scala2/typerep-stephane.scala index 2cb899591..2cb899591 100644 --- a/tests/pos/typerep-stephane.scala +++ b/tests/pos-scala2/typerep-stephane.scala diff --git a/tests/pos/viewtest1.scala b/tests/pos-scala2/viewtest1.scala index 38945ad2f..38945ad2f 100644 --- a/tests/pos/viewtest1.scala +++ b/tests/pos-scala2/viewtest1.scala diff --git a/tests/pos/t0786.scala b/tests/pos/t0786.scala index b320de0ed..9346afdff 100644 --- a/tests/pos/t0786.scala +++ b/tests/pos/t0786.scala @@ -15,7 +15,7 @@ object ImplicitProblem { def eval = f(nullval[T]).eval + 1 } - def depth[T](n: T)(implicit ev: T => Rep[T]) = n.eval + def depth[T](n: T)(implicit ev: T => Rep[T]) = ev(n).eval def main(args: Array[String]): Unit = { println(depth(nullval[M[Int]])) // (1) this works diff --git a/tests/run/iterator-from.scala b/tests/run/iterator-from.scala index 4f403680c..c7c0f9809 100644 --- a/tests/run/iterator-from.scala +++ b/tests/run/iterator-from.scala @@ -11,7 +11,9 @@ object Test extends dotty.runtime.LegacyApp { val maxKey = 50 val maxValue = 50 - def testSet[A <% Ordered[A]](set: SortedSet[A], list: List[A]): Unit = { + implicit def convertIfView[A](x: A)(implicit view: A => Ordered[A]): Ordered[A] = view(x) + + def testSet[A: Ordering](set: SortedSet[A], list: List[A]): Unit = { val distinctSorted = list.distinct.sorted assertEquals("Set size wasn't the same as list sze", set.size, distinctSorted.size) @@ -24,7 +26,7 @@ object Test extends dotty.runtime.LegacyApp { } } - def testMap[A <% Ordered[A], B](map: SortedMap[A, B], list: List[(A, B)]): Unit = { + def testMap[A: Ordering, B](map: SortedMap[A, B], list: List[(A, B)]): Unit = { val distinctSorted = distinctByKey(list).sortBy(_._1) assertEquals("Map size wasn't the same as list sze", map.size, distinctSorted.size) diff --git a/tests/run/t8280.scala b/tests/run/t8280.scala index 1d2c56b85..5fcbad0a3 100644 --- a/tests/run/t8280.scala +++ b/tests/run/t8280.scala @@ -74,14 +74,14 @@ object Moop3 { // Dotty deviation. This fails for Dotty with ambiguity error for similar reasons as ob1. } object ob2 { - implicit val f1: Int => String = _ => "Int" + implicit val f1: ImplicitConverter[Int, String] = _ => "Int" implicit def f2(x: Long): String = "Long" println(5: String) } object ob3 { - implicit val f1: Int => String = _ => "Int" - implicit val f2: Long => String = _ => "Long" + implicit val f1: ImplicitConverter[Int, String] = _ => "Int" + implicit val f2: ImplicitConverter[Long, String] = _ => "Long" println(5: String) } |