@@ -166,8 +166,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
166
166
* a reference for `m` is searched. `null` in all other situations.
167
167
*/
168
168
def findRef (name : Name , pt : Type , required : FlagSet , excluded : FlagSet , pos : SrcPos ,
169
- altImports : mutable.ListBuffer [TermRef ] | Null = null )(using Context ): Type = {
170
- val refctx = ctx
169
+ altImports : mutable.ListBuffer [TermRef ] | Null = null )(using refctx : Context ): Type = {
171
170
val noImports = ctx.mode.is(Mode .InPackageClauseName )
172
171
def suppressErrors = excluded.is(ConstructorProxy )
173
172
// when searching for references shadowed by a constructor proxy, do not report errors
@@ -211,7 +210,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
211
210
* @param prevCtx The context of the previous denotation,
212
211
* or else `NoContext` if nothing was found yet.
213
212
*/
214
- def findRefRecur (previous : Type , prevPrec : BindingPrec , prevCtx : Context )(using Context ): Type = {
213
+ def findRefRecur (previous : Type , prevPrec : BindingPrec , prevCtx : Context )(using recCtx : Context ): Type = {
215
214
import BindingPrec ._
216
215
217
216
/** Check that any previously found result from an inner context
@@ -253,7 +252,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
253
252
* @param prevCtx the context in which the reference was found
254
253
* @param using_Context the outer context of `precCtx`
255
254
*/
256
- def checkImportAlternatives (previous : Type , prevPrec : BindingPrec , prevCtx : Context )(using Context ): Type =
255
+ def checkImportAlternatives (previous : Type , prevPrec : BindingPrec , prevCtx : Context )(using impCtx : Context ): Type =
257
256
258
257
def addAltImport (altImp : TermRef ) =
259
258
if ! TypeComparer .isSameRef(previous, altImp)
@@ -371,7 +370,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
371
370
! noImports &&
372
371
(prevPrec.ordinal < prec.ordinal || prevPrec == prec && (prevCtx.scope eq ctx.scope))
373
372
374
- @ tailrec def loop (lastCtx : Context )(using Context ): Type =
373
+ @ tailrec def loop (lastCtx : Context )(using loopCtx : Context ): Type =
375
374
if (ctx.scope eq EmptyScope ) previous
376
375
else {
377
376
var result : Type = NoType
0 commit comments