aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-16 19:01:08 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-16 19:01:08 +0200
commit502f426981105df448896f635ef559cd72787c43 (patch)
treeca3a85271ae10c7f697dd3e88b07b7045bf81e2e /src/dotty/tools/dotc/core/Denotations.scala
parentf540194f1b04c044c969772d5989d129264ea781 (diff)
downloaddotty-502f426981105df448896f635ef559cd72787c43.tar.gz
dotty-502f426981105df448896f635ef559cd72787c43.tar.bz2
dotty-502f426981105df448896f635ef559cd72787c43.zip
Various bugfixes for namer/typer/trees
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala
index e551c8af2..4566cfdb8 100644
--- a/src/dotty/tools/dotc/core/Denotations.scala
+++ b/src/dotty/tools/dotc/core/Denotations.scala
@@ -456,7 +456,9 @@ object Denotations {
val valid = myValidFor
def stillValid(denot: SymDenotation): Boolean =
if (!denot.exists || (denot.flags is PackageClass)) true
- else if (denot.owner is PackageClass) denot.owner.decls.lookup(denot.name) eq symbol
+ 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)
def bringForward(): SingleDenotation = this match {
case denot: SymDenotation if stillValid(denot) =>
@@ -467,7 +469,7 @@ object Denotations {
} while (d ne denot)
initial.copyIfParentInvalid
case _ =>
- throw new Error(s"stale symbol; ${symbol.showLocated}, defined in run ${valid.runId} is referred to in run ${currentPeriod.runId}")
+ throw new Error(s"stale symbol; $this, defined in run ${valid.runId} is referred to in run ${currentPeriod.runId}")
}
if (valid.runId != currentPeriod.runId) bringForward.current
else {