aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-17 19:12:32 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-17 19:12:54 +0100
commit08880b3ce03fa8f9a4b23671ef5d1d78816d28c5 (patch)
treeacc06d05ff9d49804c80aaa940a9da647ec8b553 /src/dotty/tools/dotc/typer/Typer.scala
parentba1c6fa888488774a7e510ee09ebb80ff0ce2a3c (diff)
downloaddotty-08880b3ce03fa8f9a4b23671ef5d1d78816d28c5.tar.gz
dotty-08880b3ce03fa8f9a4b23671ef5d1d78816d28c5.tar.bz2
dotty-08880b3ce03fa8f9a4b23671ef5d1d78816d28c5.zip
Avoid SuppressedError exceptions
Note: "i" throws a supressed error to be caught in Reporters. Problem is this does not work if - "i" is evaluated in a val. That's normally an error anyway since error diagnostics should be evaluated lazily to avoid possibvly useless computation. - "i" is passed to a println in a Config.Printer. Not sure what to do about the latter. To avoid such an expression or handle it reasonably, we'd need access to the context base, which we do not have from Printers.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index c1e771f16..cc142e7bf 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -824,7 +824,7 @@ class Typer extends Namer with Applications with Implicits {
def typedBind(tree: untpd.Bind, pt: Type)(implicit ctx: Context): Bind = track("typedBind") {
val body1 = typed(tree.body, pt)
- typr.println(i"typed bind $tree pt = $pt bodytpe = ${body1.tpe}")
+ typr.println(s"typed bind ${tree.show} pt = ${pt.show} bodytpe = ${body1.tpe.show}")
val sym = ctx.newSymbol(ctx.owner, tree.name.asTermName, EmptyFlags, body1.tpe, coord = tree.pos)
cpy.Bind(tree, tree.name, body1) withType TermRef(NoPrefix, sym)
}