We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 367d730 commit 028c666Copy full SHA for 028c666
compiler/src/dotty/tools/dotc/typer/Synthesizer.scala
@@ -278,7 +278,10 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
278
val (monoType, elemsType) = mirroredType match
279
case mirroredType: HKTypeLambda =>
280
def accessorType(acc: Symbol) =
281
- acc.info.subst(cls.typeParams, mirroredType.paramRefs)
+ if cls.typeParams.hasSameLengthAs(mirroredType.paramRefs) then
282
+ acc.info.subst(cls.typeParams, mirroredType.paramRefs)
283
+ else
284
+ acc.info
285
val elems =
286
mirroredType.derivedLambdaType(
287
resType = TypeOps.nestedPairs(accessors.map(accessorType))
0 commit comments