File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -396,15 +396,16 @@ object Symbols {
396
396
* that starts being valid after `phase`.
397
397
* @pre Symbol is a class member
398
398
*/
399
- def enteredAfter (phase : DenotTransformer )(implicit ctx : Context ): this .type = {
400
- val nextCtx = ctx.withPhase(phase.next)
401
- if (this .owner.is(Package )) {
402
- denot.validFor |= InitialPeriod
403
- if (this is Module ) this .moduleClass.validFor |= InitialPeriod
399
+ def enteredAfter (phase : DenotTransformer )(implicit ctx : Context ): this .type =
400
+ if (ctx.phaseId != phase.next.id) enteredAfter(phase)(ctx.withPhase(phase.next))
401
+ else {
402
+ if (this .owner.is(Package )) {
403
+ denot.validFor |= InitialPeriod
404
+ if (this is Module ) this .moduleClass.validFor |= InitialPeriod
405
+ }
406
+ else this .owner.asClass.ensureFreshScopeAfter(phase)
407
+ entered
404
408
}
405
- else this .owner.asClass.ensureFreshScopeAfter(phase)(nextCtx)
406
- entered(nextCtx)
407
- }
408
409
409
410
/** This symbol, if it exists, otherwise the result of evaluating `that` */
410
411
def orElse (that : => Symbol )(implicit ctx : Context ) =
You can’t perform that action at this time.
0 commit comments