Skip to content

Commit 0bcae68

Browse files
fixup! Use compUnitInfo in mirrorSupportsDefaultArguments
1 parent 3ebf926 commit 0bcae68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
411411
val elemLabels = accessors.map(acc => ConstantType(Constant(acc.name.toString)))
412412
val elemsLabels = TypeOps.nestedPairs(elemLabels)
413413

414-
val elemHasDefaults = accessors.map(acc =>
415-
ConstantType(Constant(cls.mirrorSupportsDefaultArguments && acc.is(HasDefault))))
414+
val supportsDefaults = cls.mirrorSupportsDefaultArguments
415+
val elemHasDefaults = accessors.map(acc => ConstantType(Constant(supportsDefaults && acc.is(HasDefault))))
416416
val elemsHasDefaults = TypeOps.nestedPairs(elemHasDefaults)
417417

418418
val typeElems = tps.getOrElse(accessors.map(mirroredType.resultType.memberInfo(_).widenExpr))

0 commit comments

Comments
 (0)