diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-08 16:12:01 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-08 18:32:33 +0200 |
commit | 058729ceac3354a2cc34490b528e76afb09ee0ce (patch) | |
tree | 2b98e78b607c7f0438ebd2eac8b68f5a72b46a04 /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | |
parent | f87153bc5d74f66e2fcf22dc7282da31813430da (diff) | |
download | dotty-058729ceac3354a2cc34490b528e76afb09ee0ce.tar.gz dotty-058729ceac3354a2cc34490b528e76afb09ee0ce.tar.bz2 dotty-058729ceac3354a2cc34490b528e76afb09ee0ce.zip |
LazyRefs break cycles for unpickled types
Insert LazyRefs to break cycles for F-bounded types that
are unpickled or read from Java signatures.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index 59658c9c1..193c872f1 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -11,6 +11,7 @@ import java.lang.Integer.toHexString import scala.collection.{ mutable, immutable } import scala.collection.mutable.{ ListBuffer, ArrayBuffer } import scala.annotation.switch +import typer.Checking.checkNonCyclic import io.AbstractFile class ClassfileParser( @@ -337,7 +338,11 @@ class ClassfileParser( val savedIndex = index try { index = start - denot.info = sig2typeBounds(tparams, skiptvs = false) + denot.info = + checkNonCyclic( // we need the checkNonCyclic call to insert LazyRefs for F-bounded cycles + denot.symbol, + sig2typeBounds(tparams, skiptvs = false), + reportErrors = false) } finally { index = savedIndex } |