aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-26 17:02:49 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-27 12:42:49 +0100
commita6419fbd80bb63413de671af331ae35da4fa4e1b (patch)
treecd82a9535e11f1075c3467d14728f0dc9a08a4cc /src/dotty/tools/dotc/core/Types.scala
parent29c876a40adaae17d4f47cee906243bda9d8e606 (diff)
downloaddotty-a6419fbd80bb63413de671af331ae35da4fa4e1b.tar.gz
dotty-a6419fbd80bb63413de671af331ae35da4fa4e1b.tar.bz2
dotty-a6419fbd80bb63413de671af331ae35da4fa4e1b.zip
Fix Denotations#current
The logic for dealing with periods in denotation histories did not correctly take into account the case where the current validity period of a denotation ends some phases before the next type transformer starts. And there was an off-by-one error in startPid. And Types#computeDenot erroneously tried to reload denotations even the run did not change.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 501f01a74..ce481759b 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1028,7 +1028,7 @@ object Types {
val sym = lastSymbol
if (sym == null) loadDenot else denotOfSym(sym)
case d: SymDenotation =>
- if (ctx.stillValid(d)) d.current
+ if (d.validFor.runId == ctx.runId || ctx.stillValid(d)) d.current
else {
val newd = loadDenot
if (newd.exists) newd else d.staleSymbolError