File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ sealed trait Tuple extends Product {
5858 /** Return a new tuple by concatenating `this` tuple with `that` tuple.
5959 * This operation is O(this.size + that.size)
6060 */
61- inline def ++ [This >: this .type <: Tuple ](that : Tuple ): Concat [ This , that.type ] =
62- runtime.Tuples .concat(this , that).asInstanceOf [Concat [ This , that.type ] ]
61+ inline def ++ [This >: this .type <: Tuple ](that : Tuple ): This ++ that.type =
62+ runtime.Tuples .concat(this , that).asInstanceOf [This ++ that.type ]
6363
6464 /** Return the size (or arity) of the tuple */
6565 inline def size [This >: this .type <: Tuple ]: Size [This ] =
@@ -150,6 +150,9 @@ object Tuple {
150150 case x1 *: xs1 => x1 *: Concat [xs1, Y ]
151151 }
152152
153+ /** An infix shorthand for `Concat[X, Y]` */
154+ infix type ++ [X <: Tuple , + Y <: Tuple ] = Concat [X , Y ]
155+
153156 /** Type of the element at position N in the tuple X */
154157 type Elem [X <: Tuple , N <: Int ] = X match {
155158 case x *: xs =>
You can’t perform that action at this time.
0 commit comments