@@ -1220,7 +1220,7 @@ trait Implicits:
1220
1220
assert(argument.isEmpty || argument.tpe.isValueType || argument.tpe.isInstanceOf [ExprType ],
1221
1221
em " found: $argument: ${argument.tpe}, expected: $pt" )
1222
1222
1223
- private def nestedContext () =
1223
+ private def searchContext () =
1224
1224
ctx.fresh.setMode(ctx.mode &~ Mode .ImplicitsEnabled )
1225
1225
1226
1226
private def isCoherent = pt.isRef(defn.CanEqualClass )
@@ -1264,7 +1264,7 @@ trait Implicits:
1264
1264
else
1265
1265
val history = ctx.searchHistory.nest(cand, pt)
1266
1266
val typingCtx =
1267
- nestedContext ().setNewTyperState().setFreshGADTBounds.setSearchHistory(history)
1267
+ searchContext ().setNewTyperState().setFreshGADTBounds.setSearchHistory(history)
1268
1268
val result = typedImplicit(cand, pt, argument, span)(using typingCtx)
1269
1269
result match
1270
1270
case res : SearchSuccess =>
@@ -1291,7 +1291,7 @@ trait Implicits:
1291
1291
def compareAlternatives (alt1 : RefAndLevel , alt2 : RefAndLevel ): Int =
1292
1292
if alt1.ref eq alt2.ref then 0
1293
1293
else if alt1.level != alt2.level then alt1.level - alt2.level
1294
- else explore(compare(alt1.ref, alt2.ref))(using nestedContext ())
1294
+ else explore(compare(alt1.ref, alt2.ref))(using searchContext ())
1295
1295
1296
1296
/** If `alt1` is also a search success, try to disambiguate as follows:
1297
1297
* - If alt2 is preferred over alt1, pick alt2, otherwise return an
@@ -1326,7 +1326,7 @@ trait Implicits:
1326
1326
else
1327
1327
ctx.typerState
1328
1328
1329
- diff = inContext(ctx .withTyperState(comparisonState)) {
1329
+ diff = inContext(searchContext() .withTyperState(comparisonState)) {
1330
1330
compare(ref1, ref2)
1331
1331
}
1332
1332
case _ =>
0 commit comments