@@ -534,7 +534,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
534
534
*/
535
535
def toNotNullTermRef (tree : Tree , pt : Type )(using Context ): Tree = tree.tpe match
536
536
case ref : TermRef
537
- if pt != AssignProto && // Ensure it is not the lhs of Assign
537
+ if pt != LhsProto && // Ensure it is not the lhs of Assign
538
538
ctx.notNullInfos.impliesNotNull(ref) &&
539
539
// If a reference is in the context, it is already trackable at the point we add it.
540
540
// Hence, we don't use isTracked in the next line, because checking use out of order is enough.
@@ -744,7 +744,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
744
744
&& selName.isTermName && ! isDynamicExpansion(tree)
745
745
then
746
746
val tree2 = cpy.Select (tree0)(untpd.TypedSplice (qual), selName)
747
- if pt.isInstanceOf [FunOrPolyProto ] || pt == AssignProto then
747
+ if pt.isInstanceOf [FunOrPolyProto ] || pt == LhsProto then
748
748
assignType(tree2, TryDynamicCallType )
749
749
else
750
750
typedDynamicSelect(tree2, Nil , pt)
@@ -1090,8 +1090,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
1090
1090
typed(appliedUpdate, pt)
1091
1091
case lhs =>
1092
1092
val locked = ctx.typerState.ownedVars
1093
- val lhsCore = typedUnadapted(lhs, AssignProto , locked)
1094
- def lhs1 = adapt(lhsCore, AssignProto , locked)
1093
+ val lhsCore = typedUnadapted(lhs, LhsProto , locked)
1094
+ def lhs1 = adapt(lhsCore, LhsProto , locked)
1095
1095
1096
1096
def reassignmentToVal =
1097
1097
report.error(ReassignmentToVal (lhsCore.symbol.name), tree.srcPos)
@@ -4028,7 +4028,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4028
4028
if (implicitFun || caseCompanion)
4029
4029
&& ! isApplyProto(pt)
4030
4030
&& pt != SingletonTypeProto
4031
- && pt != AssignProto
4031
+ && pt != LhsProto
4032
4032
&& ! ctx.mode.is(Mode .Pattern )
4033
4033
&& ! tree.isInstanceOf [SplicePattern ]
4034
4034
&& ! ctx.isAfterTyper
0 commit comments