Skip to content

Commit

Permalink
add back in casts
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed May 31, 2024
1 parent de96d27 commit cf2745d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/src/scala/NamedTuple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ object NamedTupleDecomposition:
* If `x = (n1 = v1, ..., ni = vi)` then `x.map(f) = `(n1 = f(v1), ..., ni = f(vi))`.
*/
inline def map[F[_]](f: [t] => t => F[t]): NamedTuple[N, Tuple.Map[V, F]] =
x.toTuple.map(f)
x.toTuple.map(f).asInstanceOf[NamedTuple[N, Tuple.Map[V, F]]]

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

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

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

0 comments on commit cf2745d

Please sign in to comment.