diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-21 14:51:16 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-21 17:42:53 +0200 |
commit | c37185d3307e2b02e25e888fd44d5e8bba95aa1d (patch) | |
tree | b0ec5f8198a559abb1cf83f68a8bed3ad318a4a4 /src/dotty/tools/dotc/core/unpickleScala2 | |
parent | eaffc785be1e42c3a44ce149dfb8cabb6681d7c6 (diff) | |
download | dotty-c37185d3307e2b02e25e888fd44d5e8bba95aa1d.tar.gz dotty-c37185d3307e2b02e25e888fd44d5e8bba95aa1d.tar.bz2 dotty-c37185d3307e2b02e25e888fd44d5e8bba95aa1d.zip |
Fix #1401: Make sure all refs are forwarded
Faced with recursive dependencies through self types, we might have
to apply `normalizeToClassRefs` to a class P with a parent that is not
yet initialized (witnessed by P's parents being Nil). In that case
we should still execute forwardRefs on P, but we have to
wait in a suspension until P is initialized.
This avoids the problem raised in #1401. I am still not quite sure
why forwardRefs is needed, but it seems that asSeenFrom alone is not
enough to track the dependencies in this case.
Diffstat (limited to 'src/dotty/tools/dotc/core/unpickleScala2')
-rw-r--r-- | src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala index 3dbeb4040..14747619a 100644 --- a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala +++ b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala @@ -106,7 +106,7 @@ object Scala2Unpickler { // `denot.sourceModule.exists` provision i859.scala crashes in the backend. denot.owner.thisType select denot.sourceModule else selfInfo - denot.info = ClassInfo(denot.owner.thisType, denot.classSymbol, Nil, decls, ost) // first rough info to avoid CyclicReferences + denot.info = new TempClassInfo(denot.owner.thisType, denot.classSymbol, decls, ost) // first rough info to avoid CyclicReferences var parentRefs = ctx.normalizeToClassRefs(parents, cls, decls) if (parentRefs.isEmpty) parentRefs = defn.ObjectType :: Nil for (tparam <- tparams) { |