From 3d81218bbe1a7d3ca02ac7720cc4ab4a2e80d8c8 Mon Sep 17 00:00:00 2001 From: Lior Regev Date: Thu, 7 Sep 2023 09:55:51 +0200 Subject: [PATCH] Concrete return type for `MkFieldLens.mkFieldLens` (#1324) Co-authored-by: Lior Regev Co-authored-by: Georgi Krastev --- core/shared/src/main/scala/shapeless/lenses.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/shared/src/main/scala/shapeless/lenses.scala b/core/shared/src/main/scala/shapeless/lenses.scala index 4427de7b2..f572472f9 100644 --- a/core/shared/src/main/scala/shapeless/lenses.scala +++ b/core/shared/src/main/scala/shapeless/lenses.scala @@ -248,10 +248,10 @@ object MkFieldLens { implicit def mkFieldLens[A, K, R <: HList, B] (implicit mkGen: MkLabelledGenericLens.Aux[A, R], - mkLens: MkRecordSelectLens[R, K]): Aux[A, K, mkLens.Elem] = + mkLens: MkRecordSelectLens.Aux[R, K, B]): Aux[A, K, B] = new MkFieldLens[A, K] { - type Elem = mkLens.Elem - def apply(): Lens[A, mkLens.Elem] = mkLens() compose mkGen() + type Elem = B + def apply(): Lens[A, B] = mkLens() compose mkGen() } }