diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-25 19:00:10 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-25 19:00:10 +0200 |
commit | 254665e42f2a22ba271c2eb64cb8b1b06a7eaa5c (patch) | |
tree | e69c3c14bca8a0d6c62b9d456e7c84f93a6c648a | |
parent | eadfa6a7aa05581f43e7a39de007e2d7823d4cc3 (diff) | |
download | dotty-254665e42f2a22ba271c2eb64cb8b1b06a7eaa5c.tar.gz dotty-254665e42f2a22ba271c2eb64cb8b1b06a7eaa5c.tar.bz2 dotty-254665e42f2a22ba271c2eb64cb8b1b06a7eaa5c.zip |
Fix to baseClasses.
Need to be invalidated on new run along with superClassButs and baseTypes. Fixes a stale symbol error discovered when compiling dotc.core with erasure turned on.
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index e60633bb6..7ba6bbec6 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -1018,10 +1018,11 @@ object SymDenotations { private[this] var myBaseClasses: List[ClassSymbol] = null private[this] var mySuperClassBits: BitSet = null - /** Invalidate baseTypeRefCache and superClassBits on new run */ + /** Invalidate baseTypeRefCache, baseClasses and superClassBits on new run */ private def checkBasesUpToDate()(implicit ctx: Context) = if (baseTypeRefValid != ctx.runId) { baseTypeRefCache = new java.util.HashMap[CachedType, Type] + myBaseClasses = null mySuperClassBits = null baseTypeRefValid = ctx.runId } @@ -1069,6 +1070,7 @@ object SymDenotations { def baseClasses(implicit ctx: Context): List[ClassSymbol] = if (classParents.isEmpty) classSymbol :: Nil // can happen when called too early in Namers else { + checkBasesUpToDate() if (myBaseClasses == null) computeBases myBaseClasses } |