Skip to content

Commit 47bb54e

Browse files
committed
Remove internal genericConcat method
1 parent dfa136f commit 47bb54e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

library/src-3.x/scala/Tuple.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ sealed trait Tuple extends Any {
7272
val u = that.asInstanceOf[Tuple2[_, _]]
7373
Tuple4(t._1, t._2, u._1, u._2).asInstanceOf[Result]
7474
case _ =>
75-
genericConcat[Result](this, that).asInstanceOf[Result]
75+
knowTupleFromArray[Result](this.toArray ++ that.toArray)
7676
}
7777
case Some(3) =>
7878
val t = asInstanceOf[Tuple3[_, _, _]]
@@ -82,19 +82,16 @@ sealed trait Tuple extends Any {
8282
val u = that.asInstanceOf[Tuple1[_]]
8383
Tuple4(t._1, t._2, t._3, u._1).asInstanceOf[Result]
8484
case _ =>
85-
genericConcat[Result](this, that).asInstanceOf[Result]
85+
knowTupleFromArray[Result](this.toArray ++ that.toArray)
8686
}
8787
case Some(_) =>
8888
if (constValue[BoundedSize[that.type]] == 0) this.asInstanceOf[Result]
89-
else genericConcat[Result](this, that).asInstanceOf[Result]
89+
else knowTupleFromArray[Result](this.toArray ++ that.toArray)
9090
case None =>
9191
runtime.DynamicTuple.dynamic_++[This, that.type](this, that)
9292
}
9393
}
9494

95-
inline def genericConcat[T <: Tuple](xs: Tuple, ys: Tuple): Tuple =
96-
knowTupleFromArray[T](xs.toArray ++ ys.toArray)
97-
9895
inline def size[This >: this.type <: Tuple]: Size[This] = {
9996
type Result = Size[This]
10097
inline constValueOpt[BoundedSize[this.type]] match {

0 commit comments

Comments
 (0)