diff options
author | Martin Odersky <odersky@gmail.com> | 2016-04-27 10:33:00 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-04-27 14:01:41 +0200 |
commit | 5e599cc14ac0dfe9f7b7605e537808c927e7a6a3 (patch) | |
tree | 76c27f128a5aed82d52dda4ca1c5d79f6aff9a19 /src/dotty/tools/dotc/typer/FrontEnd.scala | |
parent | 4d7aaf637edafa1305602fc9f63b4c2ed4288ad5 (diff) | |
download | dotty-5e599cc14ac0dfe9f7b7605e537808c927e7a6a3.tar.gz dotty-5e599cc14ac0dfe9f7b7605e537808c927e7a6a3.tar.bz2 dotty-5e599cc14ac0dfe9f7b7605e537808c927e7a6a3.zip |
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.
Diffstat (limited to 'src/dotty/tools/dotc/typer/FrontEnd.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/FrontEnd.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |