From cf2745d278a43f014129a496272e74be0c95b1a5 Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Fri, 31 May 2024 15:59:35 +0200 Subject: [PATCH] add back in casts --- library/src/scala/NamedTuple.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/scala/NamedTuple.scala b/library/src/scala/NamedTuple.scala index f2c435717df6..fdaa09198649 100644 --- a/library/src/scala/NamedTuple.scala +++ b/library/src/scala/NamedTuple.scala @@ -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]] = @@ -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