We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 128eeb1 commit 367d730Copy full SHA for 367d730
compiler/src/dotty/tools/dotc/typer/Synthesizer.scala
@@ -277,9 +277,11 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
277
val elemLabels = accessors.map(acc => ConstantType(Constant(acc.name.toString)))
278
val (monoType, elemsType) = mirroredType match
279
case mirroredType: HKTypeLambda =>
280
+ def accessorType(acc: Symbol) =
281
+ acc.info.subst(cls.typeParams, mirroredType.paramRefs)
282
val elems =
283
mirroredType.derivedLambdaType(
- resType = TypeOps.nestedPairs(accessors.map(_.info))
284
+ resType = TypeOps.nestedPairs(accessors.map(accessorType))
285
)
286
(mkMirroredMonoType(mirroredType), elems)
287
case _ =>
0 commit comments