aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 1767d7c0c..06414818f 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -382,7 +382,11 @@ object Symbols {
*/
def enteredAfter(phase: DenotTransformer)(implicit ctx: Context): this.type = {
val nextCtx = ctx.withPhase(phase.next)
- this.owner.asClass.ensureFreshScopeAfter(phase)(nextCtx)
+ if (this.owner.is(Package)) {
+ denot.validFor |= InitialPeriod
+ if (this is Module) this.moduleClass.validFor |= InitialPeriod
+ }
+ else this.owner.asClass.ensureFreshScopeAfter(phase)(nextCtx)
entered(nextCtx)
}