Skip to content

Commit 9d96531

Browse files
committed
Use unadapted apply in desugaring of setter
1 parent bfd4245 commit 9d96531

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,10 +1386,9 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
13861386
val u = ensureAccessible(t, isSuperSelection(core), lhs.srcPos)
13871387
val v = untpd.rename(core, setterName).withType(u)
13881388
PartialAssignment(SimpleLValue(v)) { (l, r) =>
1389-
untpd.Apply(untpd.TypedSplice(l.expression), List(r))
13901389
// QUESTION: Why do we need the `typedUnadapted(s, WildcardType, locked)`?
1391-
// val s = untpd.Apply(untpd.TypedSplice(lvalue.expression), List(rhs))
1392-
// typedUnadapted(s, WildcardType, locked)
1390+
val s = untpd.Apply(untpd.TypedSplice(l.expression), List(r))
1391+
untpd.TypedSplice(typedUnadapted(s, WildcardType, locked))
13931392
}
13941393
case _ =>
13951394
reassignmentToVal()

0 commit comments

Comments
 (0)