We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c16445 commit db7a1eeCopy full SHA for db7a1ee
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.assertingErrorsReported
285
val elems =
286
mirroredType.derivedLambdaType(
287
resType = TypeOps.nestedPairs(accessors.map(accessorType))
0 commit comments