Skip to content

Commit 9e94083

Browse files
committed
Rename more ctx fields
1 parent 25b949e commit 9e94083

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
@@ -251,7 +251,7 @@ object ProtoTypes {
251251
* [](args): resultType
252252
*/
253253
case class FunProto(args: List[untpd.Tree], resType: Type)(typer: Typer,
254-
override val isUsingApply: Boolean, state: FunProtoState = new FunProtoState)(implicit val ctx: Context)
254+
override val isUsingApply: Boolean, state: FunProtoState = new FunProtoState)(implicit protoCtx: Context)
255255
extends UncachedGroundType with ApplyingProto with FunOrPolyProto {
256256
override def resultType(implicit ctx: Context): Type = resType
257257

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

318318
try {
319-
implicit val ctx = this.ctx
319+
implicit val ctx = protoCtx
320320
val args1 = args.mapWithIndexConserve((arg, idx) =>
321321
cacheTypedArg(arg, arg => typer.typed(norm(arg, idx)), force = false))
322322
if (!args1.exists(arg => isUndefined(arg.tpe))) state.typedArgs = args1
323323
args1
324324
}
325325
finally
326-
if (this.ctx.typerState.constraint ne prevConstraint)
327-
ctx.typerState.mergeConstraintWith(this.ctx.typerState)
326+
if (protoCtx.typerState.constraint ne prevConstraint)
327+
ctx.typerState.mergeConstraintWith(protoCtx.typerState)
328328
}
329329

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

391391
override def withContext(newCtx: Context): ProtoType =
392-
if (newCtx `eq` ctx) this
392+
if newCtx `eq` protoCtx then this
393393
else new FunProto(args, resType)(typer, isUsingApply, state)(newCtx)
394394
}
395395

0 commit comments

Comments
 (0)