diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-05 17:56:35 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | 61e8ea4824e14c9884d69eec502ea73c9ebd0838 (patch) | |
tree | a1010fdd23a76b86fd94f6984bb56c7e1c612d21 /src/dotty/tools/dotc/typer/ReTyper.scala | |
parent | ebcc2bdb8f5bacdff073868817357f23c5ce8464 (diff) | |
download | dotty-61e8ea4824e14c9884d69eec502ea73c9ebd0838.tar.gz dotty-61e8ea4824e14c9884d69eec502ea73c9ebd0838.tar.bz2 dotty-61e8ea4824e14c9884d69eec502ea73c9ebd0838.zip |
Better diagnostics for TreeChecker
1. Better formatting in TreeChecker error message
2. Re-enable printing what stack of what was checked
when an error occurred. This was disabled in Retyper
because we did not do it for the Inliner typer.
Now we distinguish on phase instead.
Diffstat (limited to 'src/dotty/tools/dotc/typer/ReTyper.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/ReTyper.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/ReTyper.scala b/src/dotty/tools/dotc/typer/ReTyper.scala index 03b415a6f..143d30f9e 100644 --- a/src/dotty/tools/dotc/typer/ReTyper.scala +++ b/src/dotty/tools/dotc/typer/ReTyper.scala @@ -87,7 +87,8 @@ class ReTyper extends Typer { try super.typedUnadapted(tree, pt) catch { case NonFatal(ex) => - typr.println(i"exception while typing $tree of class ${tree.getClass} # ${tree.uniqueId}") + if (ctx.isAfterTyper) + println(i"exception while typing $tree of class ${tree.getClass} # ${tree.uniqueId}") throw ex } |