aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala5
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala2
2 files changed, 5 insertions, 2 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)
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 271ae7a85..b454add44 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -314,7 +314,7 @@ object Symbols {
private[this] var lastDenot: SymDenotation = _
/** Set the denotation of this symbol */
- private[Symbols] def denot_=(d: SymDenotation) =
+ private[core] def denot_=(d: SymDenotation) =
lastDenot = d
/** The current denotation of this symbol */