diff options
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 5 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Symbols.scala | 2 | ||||
-rw-r--r-- | test/dotc/tests.scala | 1 |
3 files changed, 6 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 */ diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index 0fef6252e..bd558fc16 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -49,6 +49,7 @@ class tests extends CompilerTest { @Test def dotc_core = compileDir(dotcDir + "tools/dotc/core") @Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling") @Test def dotc_transform = compileDir(dotcDir + "tools/dotc/core/transform") + @Test def dotc_parsing = compileDir(dotcDir + "tools/dotc/core/parsing") // @Test def dotc_compilercommand = compileFile(dotcDir + "tools/dotc/config/", "CompilerCommand") |