aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-08-31 17:57:10 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-31 17:57:10 +0200
commite7e1cdce8eb25452ed97e8a019cc63aaecab6fc6 (patch)
tree3adaff1c1a3255c7f2a8fa941fa8d87689934701 /src/dotty/tools/dotc/core/Types.scala
parent6e47e2b8bce96571e643bdd5f4cdca01002aff4e (diff)
downloaddotty-e7e1cdce8eb25452ed97e8a019cc63aaecab6fc6.tar.gz
dotty-e7e1cdce8eb25452ed97e8a019cc63aaecab6fc6.tar.bz2
dotty-e7e1cdce8eb25452ed97e8a019cc63aaecab6fc6.zip
Avoid reloading NonMemberSyms.
Non member symbols should not be reloaded in any case.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 1cd9c4af9..33a8d4be1 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1148,7 +1148,9 @@ object Types {
val sym = lastSymbol
if (sym == null) loadDenot else denotOfSym(sym)
case d: SymDenotation =>
- if (d.validFor.runId == ctx.runId || ctx.stillValid(d)) d.current
+ if ( d.validFor.runId == ctx.runId
+ || ctx.stillValid(d)
+ || this.isInstanceOf[WithNonMemberSym]) d.current
else {
val newd = loadDenot
if (newd.exists) newd else d.staleSymbolError
@@ -1236,7 +1238,7 @@ object Types {
else { // name has changed; try load in earlier phase and make current
val d = loadDenot(ctx.withPhase(ctx.phaseId - 1)).current
if (d.exists) d
- else throw new Error(s"failure to reload $this")
+ else throw new Error(s"failure to reload $this of class $getClass")
}
}