Skip to content

Commit 4953991

Browse files
committed
Workaround scala#11247
1 parent b850f2a commit 4953991

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

bench-run/src/main/scala/dotty/tools/benchmarks/tuples/TupleOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class TupleOps {
5050
def tupleMergeSort(tuple: Tuple): Tuple =
5151
if (tuple.size <= 1) tuple
5252
else {
53-
val (tuple1, tuple2) = tuple.splitAt(tuple.size / 2)
53+
val (tuple1: Tuple, tuple2: Tuple) = tuple.splitAt(tuple.size / 2) // TODO remove ascriptions when #11247 is fixed
5454
val (sorted1, sorted2) = (tupleMergeSort(tuple1), tupleMergeSort(tuple2))
5555
tupleMerge(sorted1, sorted2)
5656
}

library/src/scala/Tuple.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ sealed trait Tuple extends Product {
7070
* consisting of the first n elements, and the tuple `(an+1, ..., am)` consisting
7171
* of the remaining elements.
7272
*/
73-
// FIXME remove transparent
74-
// failure in bench-run/src/main/scala/dotty/tools/benchmarks/tuples/TupleOps.scala
75-
transparent inline def splitAt[This >: this.type <: Tuple](n: Int): Split[This, n.type] =
73+
inline def splitAt[This >: this.type <: Tuple](n: Int): Split[This, n.type] =
7674
runtime.Tuples.splitAt(this, n).asInstanceOf[Split[This, n.type]]
7775
}
7876

0 commit comments

Comments
 (0)