From 26b98992e161a567c0312eb6701724c9c57b0f12 Mon Sep 17 00:00:00 2001 From: Antoine Brunner Date: Thu, 21 Nov 2019 08:17:46 +0100 Subject: [PATCH] Revert some unwanted changes, preparing for PR --- bench/src/main/scala/Benchmarks.scala | 1 + library/src/scala/runtime/DynamicTuple.scala | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bench/src/main/scala/Benchmarks.scala b/bench/src/main/scala/Benchmarks.scala index 86b967762fb6..779579cd1c6b 100644 --- a/bench/src/main/scala/Benchmarks.scala +++ b/bench/src/main/scala/Benchmarks.scala @@ -30,6 +30,7 @@ object Bench { val iterations = if (intArgs.length > 1) intArgs(1).toInt else 20 val forks = if (intArgs.length > 2) intArgs(2).toInt else 1 + import File.{ separator => sep } val args2 = args1.map { arg => diff --git a/library/src/scala/runtime/DynamicTuple.scala b/library/src/scala/runtime/DynamicTuple.scala index 53d44f75d449..ae75f133a5c1 100644 --- a/library/src/scala/runtime/DynamicTuple.scala +++ b/library/src/scala/runtime/DynamicTuple.scala @@ -257,12 +257,9 @@ object DynamicTuple { ).asInstanceOf[Zip[This, T2]] } - def dynamicMap[This <: Tuple, F[_]](self: This, f: [t] => t => F[t]): Map[This, F] = (self: Any) match { - case self: Unit => ().asInstanceOf[Map[This, F]] - case _ => - Tuple.fromArray(self.asInstanceOf[Product].productIterator.map(f(_)).toArray) // TODO use toIArray of Object to avoid double/triple array copy - .asInstanceOf[Map[This, F]] - } + def dynamicMap[This <: Tuple, F[_]](self: This, f: [t] => t => F[t]): Map[This, F] = + Tuple.fromArray(self.asInstanceOf[Product].productIterator.map(f(_)).toArray) // TODO use toIArray of Object to avoid double/triple array copy + .asInstanceOf[Map[This, F]] def consIterator(head: Any, tail: Tuple): Iterator[Any] = Iterator.single(head) ++ tail.asInstanceOf[Product].productIterator