aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-15 14:01:16 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-15 14:01:16 +0100
commit2112492ec908019d1515128c68f1c737518cac3c (patch)
treecb0809dde7bc41095c207ad5d2d65bbf8155d611 /src/dotty/tools/dotc/core/SymDenotations.scala
parent3d9a664e75307410b8845ecc1540a00924867912 (diff)
downloaddotty-2112492ec908019d1515128c68f1c737518cac3c.tar.gz
dotty-2112492ec908019d1515128c68f1c737518cac3c.tar.bz2
dotty-2112492ec908019d1515128c68f1c737518cac3c.zip
Avoid stale symbol errors for package objects
Happened (albeit non-deterministally) when compiling parsing/*.scala
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala5
1 files changed, 4 insertions, 1 deletions
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)