diff options
author | Martin Odersky <odersky@gmail.com> | 2015-11-08 20:12:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-11-09 15:45:41 +0100 |
commit | 4007e71ecaf17d794ba5fc8aa8d2700efc3e3263 (patch) | |
tree | e1bbe61ee0d661a6e0b135f865602b3c160c0abc /src/dotty/tools/dotc/typer/ReTyper.scala | |
parent | 224637c1cd0524d538cdd6fe261746f2c10b46ff (diff) | |
download | dotty-4007e71ecaf17d794ba5fc8aa8d2700efc3e3263.tar.gz dotty-4007e71ecaf17d794ba5fc8aa8d2700efc3e3263.tar.bz2 dotty-4007e71ecaf17d794ba5fc8aa8d2700efc3e3263.zip |
More refined Retyping tracing
Instead of simply dropping all Retyper error traces, we now
send them to the config.Printers.transforms printer, so what happens depends
on the value of that printer.
Diffstat (limited to 'src/dotty/tools/dotc/typer/ReTyper.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/ReTyper.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/ReTyper.scala b/src/dotty/tools/dotc/typer/ReTyper.scala index fc8cce45e..49718fd00 100644 --- a/src/dotty/tools/dotc/typer/ReTyper.scala +++ b/src/dotty/tools/dotc/typer/ReTyper.scala @@ -10,6 +10,7 @@ import typer.ProtoTypes._ import ast.{tpd, untpd} import ast.Trees._ import scala.util.control.NonFatal +import config.Printers /** A version of Typer that keeps all symbols defined and referenced in a * previously typed tree. @@ -86,14 +87,14 @@ class ReTyper extends Typer { case _ => super.handleUnexpectedFunType(tree, fun) } -/* + override def typedUnadapted(tree: untpd.Tree, pt: Type)(implicit ctx: Context) = try super.typedUnadapted(tree, pt) catch { case NonFatal(ex) => - println(i"exception while typing $tree of class ${tree.getClass} # ${tree.uniqueId}") + Printers.transforms.println(i"exception while typing $tree of class ${tree.getClass} # ${tree.uniqueId}") throw ex } -*/ + override def checkVariance(tree: Tree)(implicit ctx: Context) = () } |