Skip to content

Commit 367d730

Browse files
committed
A better fix
1 parent 128eeb1 commit 367d730

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Synthesizer.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,11 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
277277
val elemLabels = accessors.map(acc => ConstantType(Constant(acc.name.toString)))
278278
val (monoType, elemsType) = mirroredType match
279279
case mirroredType: HKTypeLambda =>
280+
def accessorType(acc: Symbol) =
281+
acc.info.subst(cls.typeParams, mirroredType.paramRefs)
280282
val elems =
281283
mirroredType.derivedLambdaType(
282-
resType = TypeOps.nestedPairs(accessors.map(_.info))
284+
resType = TypeOps.nestedPairs(accessors.map(accessorType))
283285
)
284286
(mkMirroredMonoType(mirroredType), elems)
285287
case _ =>

0 commit comments

Comments
 (0)