Skip to content

Commit

Permalink
Add an explicit type instantiation in NamedTuple.map
Browse files Browse the repository at this point in the history
To avoid triggering a deep subtype comparison
needed for the inference of the higher-kinded type parameter.
  • Loading branch information
EugeneFlesselle committed Oct 9, 2024
1 parent 6a971b1 commit bd88a0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/src-bootstrapped/scala/NamedTuple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,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]): Map[NamedTuple[N, V], F] =
x.toTuple.map(f)
x.toTuple.map[F](f)

/** The named tuple consisting of all elements of this tuple in reverse */
inline def reverse: Reverse[NamedTuple[N, V]] = x.toTuple.reverse
Expand Down

0 comments on commit bd88a0f

Please sign in to comment.