Skip to content

Commit cf2745d

Browse files
committed
add back in casts
1 parent de96d27 commit cf2745d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/NamedTuple.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ object NamedTupleDecomposition:
191191
* If `x = (n1 = v1, ..., ni = vi)` then `x.map(f) = `(n1 = f(v1), ..., ni = f(vi))`.
192192
*/
193193
inline def map[F[_]](f: [t] => t => F[t]): NamedTuple[N, Tuple.Map[V, F]] =
194-
x.toTuple.map(f)
194+
x.toTuple.map(f).asInstanceOf[NamedTuple[N, Tuple.Map[V, F]]]
195195

196196
/** The named tuple consisting of all elements of this tuple in reverse */
197197
inline def reverse: NamedTuple[Tuple.Reverse[N], Tuple.Reverse[V]] =
@@ -208,7 +208,7 @@ object NamedTupleDecomposition:
208208
x.toTuple.zip(that.toTuple)
209209

210210
/** A list consisting of all element values */
211-
inline def toList: List[Tuple.Union[V]] = x.toTuple.toList
211+
inline def toList: List[Tuple.Union[V]] = x.toTuple.toList.asInstanceOf[List[Tuple.Union[V]]]
212212

213213
/** An array consisting of all element values */
214214
inline def toArray: Array[Object] = x.toTuple.toArray

0 commit comments

Comments
 (0)