Skip to content

Commit 5da69b9

Browse files
Mark type Append 2nd argument as covariant
1 parent 01b5de0 commit 5da69b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/Tuple.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ object Tuple:
154154
type Split[X <: Tuple, N <: Int] = (Take[X, N], Drop[X, N])
155155

156156
/** Type of a tuple with an element appended */
157-
type Append[X <: Tuple, Y] <: NonEmptyTuple = X match
157+
type Append[X <: Tuple, +Y] <: NonEmptyTuple = X match
158158
case EmptyTuple => Y *: EmptyTuple
159159
case x *: xs => x *: Append[xs, Y]
160160

161161
/** An infix shorthand for `Append[X, Y]` */
162-
infix type :*[X <: Tuple, Y] = Append[X, Y]
162+
infix type :*[X <: Tuple, +Y] = Append[X, Y]
163163

164164
/** Type of the concatenation of two tuples `X` and `Y` */
165165
// Can be covariant in `Y` since it never appears as a match type scrutinee.

0 commit comments

Comments
 (0)