File tree 1 file changed +5
-2
lines changed
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 {
58
58
/** Return a new tuple by concatenating `this` tuple with `that` tuple.
59
59
* This operation is O(this.size + that.size)
60
60
*/
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 ]
63
63
64
64
/** Return the size (or arity) of the tuple */
65
65
inline def size [This >: this .type <: Tuple ]: Size [This ] =
@@ -150,6 +150,9 @@ object Tuple {
150
150
case x1 *: xs1 => x1 *: Concat [xs1, Y ]
151
151
}
152
152
153
+ /** An infix shorthand for `Concat[X, Y]` */
154
+ infix type ++ [X <: Tuple , + Y <: Tuple ] = Concat [X , Y ]
155
+
153
156
/** Type of the element at position N in the tuple X */
154
157
type Elem [X <: Tuple , N <: Int ] = X match {
155
158
case x *: xs =>
You can’t perform that action at this time.
0 commit comments