diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 01e403120..845672149 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -30,6 +30,13 @@ trait SymDenotations { this: Context => result.validFor = stablePeriod result } + + def stillValid(denot: SymDenotation): Boolean = + if (denot is ValidForever) true + else if (denot.owner is PackageClass) + (denot.owner.decls.lookup(denot.name) eq denot.symbol) || + (denot is ModuleClass) && stillValid(denot.sourceModule) // !!! DEBUG - we should check why module classes are not entered + else stillValid(denot.owner) } object SymDenotations { |