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 @@ -34,8 +34,8 @@ sealed trait Tuple extends Product {
34
34
/** Return a new tuple by concatenating `this` tuple with `that` tuple.
35
35
* This operation is O(this.size + that.size)
36
36
*/
37
- inline def ++ [This >: this .type <: Tuple ](that : Tuple ): Concat [ This , that.type ] =
38
- runtime.Tuples .concat(this , that).asInstanceOf [Concat [ This , that.type ] ]
37
+ inline def ++ [This >: this .type <: Tuple ](that : Tuple ): This ++ that.type =
38
+ runtime.Tuples .concat(this , that).asInstanceOf [This ++ that.type ]
39
39
40
40
/** Return the size (or arity) of the tuple */
41
41
inline def size [This >: this .type <: Tuple ]: Size [This ] =
@@ -126,6 +126,9 @@ object Tuple {
126
126
case x1 *: xs1 => x1 *: Concat [xs1, Y ]
127
127
}
128
128
129
+ /** An infix shorthand for `Concat[X, Y]` */
130
+ infix type ++ [X <: Tuple , + Y <: Tuple ] = Concat [X , Y ]
131
+
129
132
/** Type of the element at position N in the tuple X */
130
133
type Elem [X <: Tuple , N <: Int ] = X match {
131
134
case x *: xs =>
You can’t perform that action at this time.
0 commit comments