Skip to content

Commit 2f34f69

Browse files
committed
Rename more ctx fields
1 parent 5731ee4 commit 2f34f69

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ object ProtoTypes {
248248
* [](args): resultType
249249
*/
250250
case class FunProto(args: List[untpd.Tree], resType: Type)(typer: Typer,
251-
override val isUsingApply: Boolean, state: FunProtoState = new FunProtoState)(implicit val ctx: Context)
251+
override val isUsingApply: Boolean, state: FunProtoState = new FunProtoState)(implicit protoCtx: Context)
252252
extends UncachedGroundType with ApplyingProto with FunOrPolyProto {
253253
override def resultType(implicit ctx: Context): Type = resType
254254

@@ -310,18 +310,18 @@ object ProtoTypes {
310310
def typedArgs(norm: (untpd.Tree, Int) => untpd.Tree = sameTree)(implicit ctx: Context): List[Tree] =
311311
if (state.typedArgs.size == args.length) state.typedArgs
312312
else {
313-
val prevConstraint = this.ctx.typerState.constraint
313+
val prevConstraint = protoCtx.typerState.constraint
314314

315315
try {
316-
implicit val ctx = this.ctx
316+
implicit val ctx = protoCtx
317317
val args1 = args.mapWithIndexConserve((arg, idx) =>
318318
cacheTypedArg(arg, arg => typer.typed(norm(arg, idx)), force = false))
319319
if (!args1.exists(arg => isUndefined(arg.tpe))) state.typedArgs = args1
320320
args1
321321
}
322322
finally
323-
if (this.ctx.typerState.constraint ne prevConstraint)
324-
ctx.typerState.mergeConstraintWith(this.ctx.typerState)
323+
if (protoCtx.typerState.constraint ne prevConstraint)
324+
ctx.typerState.mergeConstraintWith(protoCtx.typerState)
325325
}
326326

327327
/** Type single argument and remember the unadapted result in `myTypedArg`.
@@ -386,7 +386,7 @@ object ProtoTypes {
386386
override def deepenProto(implicit ctx: Context): FunProto = derivedFunProto(args, resultType.deepenProto, typer)
387387

388388
override def withContext(newCtx: Context): ProtoType =
389-
if (newCtx `eq` ctx) this
389+
if newCtx `eq` protoCtx then this
390390
else new FunProto(args, resType)(typer, isUsingApply, state)(newCtx)
391391
}
392392

0 commit comments

Comments
 (0)