diff options
author | Martin Odersky <odersky@gmail.com> | 2013-09-25 15:02:59 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-09-25 15:02:59 +0200 |
commit | b7f5aa30383730dc1d2b34f9773695d0f5669bcd (patch) | |
tree | 2e3dc8e18a09c1f7ca271c4f282be972aeab34fd /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 50a84e0e900fd5a67a4701fd2730a0c0bf66b834 (diff) | |
download | dotty-b7f5aa30383730dc1d2b34f9773695d0f5669bcd.tar.gz dotty-b7f5aa30383730dc1d2b34f9773695d0f5669bcd.tar.bz2 dotty-b7f5aa30383730dc1d2b34f9773695d0f5669bcd.zip |
Sereval more bugfixes to typer and type handling.
Several of these avoided stackoverflows/cyclic references
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 { |