File tree 1 file changed +10
-8
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -176,15 +176,17 @@ object Implicits {
176
176
if (monitored) record(s " elided eligible refs " , elided(this ))
177
177
eligibles
178
178
case None =>
179
- val savedEphemeral = ctx.typerState.ephemeral
180
- ctx.typerState.ephemeral = false
181
- try {
182
- val result = computeEligible(tp)
183
- if (ctx.typerState.ephemeral) record(" ephemeral cache miss: eligible" )
184
- else eligibleCache(tp) = result
185
- result
179
+ if (ctx eq NoContext ) Nil
180
+ else {
181
+ val savedEphemeral = ctx.typerState.ephemeral
182
+ ctx.typerState.ephemeral = false
183
+ try {
184
+ val result = computeEligible(tp)
185
+ if (ctx.typerState.ephemeral) record(" ephemeral cache miss: eligible" )
186
+ else eligibleCache(tp) = result
187
+ result
188
+ } finally ctx.typerState.ephemeral |= savedEphemeral
186
189
}
187
- finally ctx.typerState.ephemeral |= savedEphemeral
188
190
}
189
191
}
190
192
You can’t perform that action at this time.
0 commit comments