From 3527136c4564c906e14eaddbfb9359133e0eca54 Mon Sep 17 00:00:00 2001 From: Lucas Nouguier Date: Tue, 21 May 2024 18:32:48 +0200 Subject: [PATCH] fix: added changes :) --- compiler/src/dotty/tools/dotc/typer/Typer.scala | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index ae50d626cb1f..983782ebec52 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -1333,13 +1333,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer EmptyTree val setter = toSetter(lhsCore) - if setter.isEmpty then reassignmentToVal - else tryEither { - val assign = untpd.Apply(setter, tree.rhs :: Nil) - typed(assign, IgnoredProto(pt)) - } { - (_, _) => reassignmentToVal - } + val assign = untpd.Apply(setter, tree.rhs :: Nil) + typed(assign, IgnoredProto(pt)) case _ => lhsCore.tpe match { case ref: TermRef => val lhsVal = lhsCore.denot.suchThat(!_.is(Method))