diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-07 20:25:23 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-08 18:32:09 +0200 |
commit | f87153bc5d74f66e2fcf22dc7282da31813430da (patch) | |
tree | 02ec1ea59e55e895140e5f1b1e3ec9a09c18ce92 /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 9748c9bd54e278e65a29dff6c78fba5b1534ac00 (diff) | |
download | dotty-f87153bc5d74f66e2fcf22dc7282da31813430da.tar.gz dotty-f87153bc5d74f66e2fcf22dc7282da31813430da.tar.bz2 dotty-f87153bc5d74f66e2fcf22dc7282da31813430da.zip |
Detect cycles and protected legal ones with LazyRefs
Cycles are now detected early, when an info is first completed.
Legal, f-bounded cycles are broken by a LazyRef, which will construct
its type lazily. This makes checkBounds validation of AppliedTypeTrees work
(in FirstTransform). Formerly, this stackoverflowed despite the laziness
precautions in findMember.
Todo: Do the same for class files coming from Java and Scala 2.x.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index fcc01503f..fd47ee4ec 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -1471,6 +1471,8 @@ object SymDenotations { def complete(denot: SymDenotation)(implicit ctx: Context): Unit = unsupported("complete") } + object NoCompleter extends NoCompleter + /** A lazy type for modules that points to the module class. * Needed so that `moduleClass` works before completion. * Completion of modules is always completion of the underlying |