From 553e89bf5979c7ed5436aa9581fbc3c0f46fdc5c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 2 Apr 2015 17:20:51 +0200 Subject: 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. --- src/dotty/tools/dotc/transform/Pickler.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/dotty/tools/dotc/transform/Pickler.scala') 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) -- cgit v1.2.3