diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-27 08:55:21 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-27 08:55:21 +0200 |
commit | 292ce6844a212b47defc671c91396d7cec86833b (patch) | |
tree | 43c4576fc6b2e05e4f7552106bbdb57e13fdf06b /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 08c6eacaf59386ed26aeead472e1df2c5944a3fb (diff) | |
download | dotty-292ce6844a212b47defc671c91396d7cec86833b.tar.gz dotty-292ce6844a212b47defc671c91396d7cec86833b.tar.bz2 dotty-292ce6844a212b47defc671c91396d7cec86833b.zip |
Rebinding ThisTypes
ThisTypes do escape. It seems that Scala 2 pickling produces ThisTypes that refer to base
classes of the class being compiled. If the base class is in a separate compilation unit,
this can lead to a stale class symbol in the ThisType. We solve this here by rebinding the
class symbol in the ThisType. We should also explore the alternative:
class ThisType(tref: TypeRef) ...
That would do the rebinding as part of the generation denotation resolution mechanism.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index a3828552d..cb457bd73 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -1011,7 +1011,7 @@ object SymDenotations { if ((pre eq NoPrefix) || ctx.erasedTypes) pre select sourceModule else TermRef.withSig(pre, name.sourceModuleName, Signature.NotAMethod) } - else ThisType(classSymbol) + else ThisType.raw(classSymbol) private[this] var myTypeRef: TypeRef = null |