Skip to content

Commit

Permalink
Workaround scala#11247
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Feb 4, 2021
1 parent b850f2a commit 4953991
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TupleOps {
def tupleMergeSort(tuple: Tuple): Tuple =
if (tuple.size <= 1) tuple
else {
val (tuple1, tuple2) = tuple.splitAt(tuple.size / 2)
val (tuple1: Tuple, tuple2: Tuple) = tuple.splitAt(tuple.size / 2) // TODO remove ascriptions when #11247 is fixed
val (sorted1, sorted2) = (tupleMergeSort(tuple1), tupleMergeSort(tuple2))
tupleMerge(sorted1, sorted2)
}
Expand Down
4 changes: 1 addition & 3 deletions library/src/scala/Tuple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ sealed trait Tuple extends Product {
* consisting of the first n elements, and the tuple `(an+1, ..., am)` consisting
* of the remaining elements.
*/
// FIXME remove transparent
// failure in bench-run/src/main/scala/dotty/tools/benchmarks/tuples/TupleOps.scala
transparent inline def splitAt[This >: this.type <: Tuple](n: Int): Split[This, n.type] =
inline def splitAt[This >: this.type <: Tuple](n: Int): Split[This, n.type] =
runtime.Tuples.splitAt(this, n).asInstanceOf[Split[This, n.type]]
}

Expand Down

0 comments on commit 4953991

Please sign in to comment.