aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/Pickler.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-04-02 17:20:51 +0200
committerMartin Odersky <odersky@gmail.com>2015-04-07 23:43:15 +0200
commit553e89bf5979c7ed5436aa9581fbc3c0f46fdc5c (patch)
treeae1dee3ece8926dfeddf9272c558e33e0668c034 /src/dotty/tools/dotc/transform/Pickler.scala
parente1e0e9abb6c2b6285d598e260cc1d1c4ac2d3c2a (diff)
downloaddotty-553e89bf5979c7ed5436aa9581fbc3c0f46fdc5c.tar.gz
dotty-553e89bf5979c7ed5436aa9581fbc3c0f46fdc5c.tar.bz2
dotty-553e89bf5979c7ed5436aa9581fbc3c0f46fdc5c.zip
Use invalidateInheritedSymbols instead of syncWithParents
syncWithParents explores the denotations of symbols that might yet to be entered in the current run. If such a symbol is looked at in a new run before a new one is entered, the validty period of the old denotation is extended to the new run and consequently references to that symbol do not know they need to reload. This pollutes the cache of references and causes StaleSymbol errors down the line. Replacing with invalidateInheritedSymbols avoids the problem.
Diffstat (limited to 'src/dotty/tools/dotc/transform/Pickler.scala')
-rw-r--r--src/dotty/tools/dotc/transform/Pickler.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/Pickler.scala b/src/dotty/tools/dotc/transform/Pickler.scala
index e238f21ef..626a75139 100644
--- a/src/dotty/tools/dotc/transform/Pickler.scala
+++ b/src/dotty/tools/dotc/transform/Pickler.scala
@@ -65,6 +65,7 @@ class Pickler extends Phase {
unpickler.enter(roots = Set())
unpickler
}
+ pickling.println("************* entered toplevel ***********")
for ((unpickler, unit) <- unpicklers zip units) {
val unpickled = unpickler.body(readPositions = false)
testSame(i"$unpickled%\n%", beforePickling(unit), unit)