diff options
author | Martin Odersky <odersky@gmail.com> | 2015-11-09 15:25:34 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-11-09 15:45:41 +0100 |
commit | e8b07a33e085136a70b68f5172153c8e557c89f9 (patch) | |
tree | 4423de22425f9efdc690b81dbc5559e51e34d4ca /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 9fe9865d462a646ca122f9a00bd3ad5595905e90 (diff) | |
download | dotty-e8b07a33e085136a70b68f5172153c8e557c89f9.tar.gz dotty-e8b07a33e085136a70b68f5172153c8e557c89f9.tar.bz2 dotty-e8b07a33e085136a70b68f5172153c8e557c89f9.zip |
Better diagnosis from completions printer
Track starts and ends of completions using indentation.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index a74cf0000..feb0c22df 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -163,6 +163,11 @@ object SymDenotations { } private def completeFrom(completer: LazyType)(implicit ctx: Context): Unit = { + if (completions ne noPrinter) { + completions.println(i"${" " * indent}completing ${if (isType) "type" else "val"} $name") + indent += 1 + } + indent += 1 if (myFlags is Touched) throw CyclicReference(this) myFlags |= Touched @@ -173,6 +178,11 @@ object SymDenotations { completions.println(s"error while completing ${this.debugString}") throw ex } + finally + if (completions ne noPrinter) { + indent -= 1 + completions.println(i"${" " * indent}completed $name in $owner") + } // completions.println(s"completed ${this.debugString}") } @@ -1872,4 +1882,6 @@ object SymDenotations { } private val AccessorOrLabel = Accessor | Label + + private var indent = 0 // for completions printing } |