aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-14 13:07:57 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-14 13:07:57 +0100
commita0b6798f3127196114da818b18fbeda9633ca209 (patch)
treedcfed6db17fdb04a2653e44ff6644c1798de6ecf /src/dotty/tools/dotc/core/SymDenotations.scala
parent550bf861e28a62a5057d6816e0bd336463e9b0bf (diff)
downloaddotty-a0b6798f3127196114da818b18fbeda9633ca209.tar.gz
dotty-a0b6798f3127196114da818b18fbeda9633ca209.tar.bz2
dotty-a0b6798f3127196114da818b18fbeda9633ca209.zip
Avoiding cyclic references involving module vals and imports.
Previousely, compiling all of dotc/core caused a cyclic reference. The cyclic reference was caused by evaluating a module val, which caused it to evaluate its type, which caused the evaluation of all preceding imports, which led via some hops back to the same module val. We now break the cycle by computing the signature of a module val without going through its type.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 58f148ba5..18b5c5f8f 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -12,6 +12,7 @@ import Decorators.SymbolIteratorDecorator
import annotation.tailrec
import util.SimpleMap
import config.Config
+import config.Printers._
trait SymDenotations { this: Context =>
import SymDenotations._
@@ -127,7 +128,7 @@ object SymDenotations {
if (myFlags is Touched) throw new CyclicReference(this)
myFlags |= Touched
- Context.theBase.initialCtx.debugTraceIndented(s"completing ${this.debugString}") {
+ Context.theBase.initialCtx.traceIndented(completions, s"completing ${this.debugString}") {
// println("completing " + debugString)
completer.complete(this)
}