From 5e599cc14ac0dfe9f7b7605e537808c927e7a6a3 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 27 Apr 2016 10:33:00 +0200 Subject: Rename Reporting#println -> Reporting#echo There's a trap otherwise that, when in a class inheriting from Context (and with it Reporting) a call to println will go to this.println and therefore might not print at all, if the current context buffers messages. I lost a lot of time on this on several occasions when I scratched my head why a simple debug println would not show. Better avoid this in the future for myself and others. --- src/dotty/tools/dotc/typer/FrontEnd.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer/FrontEnd.scala') diff --git a/src/dotty/tools/dotc/typer/FrontEnd.scala b/src/dotty/tools/dotc/typer/FrontEnd.scala index eee8744a5..c5c6aec3c 100644 --- a/src/dotty/tools/dotc/typer/FrontEnd.scala +++ b/src/dotty/tools/dotc/typer/FrontEnd.scala @@ -23,7 +23,7 @@ class FrontEnd extends Phase { try body catch { case NonFatal(ex) => - ctx.println(s"exception occurred while $doing ${ctx.compilationUnit}") + ctx.echo(s"exception occurred while $doing ${ctx.compilationUnit}") throw ex } -- cgit v1.2.3