diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-25 21:45:20 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-25 21:45:20 +0100 |
commit | 5a039031c165fd9116749f28e9d9e6a0b6d5b0e6 (patch) | |
tree | 0a0b956ad7d384cf31a8d2b7835fe716c33d2834 /src/dotty/tools/dotc/core/pickling/UnPickler.scala | |
parent | 27a508c50482f4053591ed740f09ecced5bf749b (diff) | |
download | dotty-5a039031c165fd9116749f28e9d9e6a0b6d5b0e6.tar.gz dotty-5a039031c165fd9116749f28e9d9e6a0b6d5b0e6.tar.bz2 dotty-5a039031c165fd9116749f28e9d9e6a0b6d5b0e6.zip |
More fixes to classfile reading.
Can now read entire contents of scala distribution.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/UnPickler.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/UnPickler.scala | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala index e34209aa1..161034bde 100644 --- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala +++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala @@ -364,14 +364,16 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: // return NoSymbol if (tag == EXTMODCLASSref) { - unimplementedTree(s"nested objects") - /* + val module = owner.info.decl(name.toTermName).suchThat(_ is Module) + module.info // force it, as completer does not yet point to module class. + module.symbol.moduleClass + + /* was: val moduleVar = owner.info.decl(name.toTermName.moduleVarName).symbol if (moduleVar.isLazyAccessor) return moduleVar.lazyAccessor.lazyAccessor -*/ - } - NoSymbol + */ + } else NoSymbol } // println(s"read ext symbol $name from ${owner.denot.debugString} in ${classRoot.debugString}") // !!! DEBUG @@ -562,7 +564,9 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: val tp1 = elim(tp) val isBound = (tp: Type) => boundSyms contains tp.typeSymbol if (tp1 existsPart isBound) { - val tp2 = tp1.subst(boundSyms, boundSyms map (_ => defn.AnyType)) + val anyTypes = boundSyms map (_ => defn.AnyType) + val boundBounds = boundSyms map (_.info.bounds.hi) + val tp2 = tp1.subst(boundSyms, boundBounds).subst(boundSyms, anyTypes) cctx.warning(s"""failure to eliminate existential |original type : $tp forSome {${cctx.dclsText(boundSyms, "; ").show} |reduces to : $tp1 |