From bd88a0f510a7c4c910e33bee2bf2ca8626ff78ea Mon Sep 17 00:00:00 2001 From: Eugene Flesselle Date: Wed, 9 Oct 2024 17:03:47 +0200 Subject: [PATCH] Add an explicit type instantiation in `NamedTuple.map` To avoid triggering a deep subtype comparison needed for the inference of the higher-kinded type parameter. --- library/src-bootstrapped/scala/NamedTuple.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src-bootstrapped/scala/NamedTuple.scala b/library/src-bootstrapped/scala/NamedTuple.scala index f8a821dc45ef..d105cf042f37 100644 --- a/library/src-bootstrapped/scala/NamedTuple.scala +++ b/library/src-bootstrapped/scala/NamedTuple.scala @@ -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