From 2112492ec908019d1515128c68f1c737518cac3c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 15 Jan 2014 14:01:16 +0100 Subject: Avoid stale symbol errors for package objects Happened (albeit non-deterministally) when compiling parsing/*.scala --- src/dotty/tools/dotc/core/SymDenotations.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala') diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 7eea9fd64..8f7725fbe 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -912,7 +912,10 @@ object SymDenotations { } if (this is PackageClass) { // replace existing symbols val entry = mscope.lookupEntry(sym.name) - if (entry != null) mscope.unlink(entry) + if (entry != null) { + mscope.unlink(entry) + entry.sym.denot = sym.denot // to avoid stale symbols + } } mscope.enter(sym) -- cgit v1.2.3