diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-17 15:28:17 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-10-26 16:24:00 +0100 |
commit | 25a8937f115ed2ac1af33c41c73a621dab4ee712 (patch) | |
tree | 2448efa9ddd72cea1f76635964567e7c3a638a79 /src/dotty/tools/dotc/core | |
parent | 7eaee332674c16179221d12cba202d430bc3d5a3 (diff) | |
download | dotty-25a8937f115ed2ac1af33c41c73a621dab4ee712.tar.gz dotty-25a8937f115ed2ac1af33c41c73a621dab4ee712.tar.bz2 dotty-25a8937f115ed2ac1af33c41c73a621dab4ee712.zip |
Add echo method to printers.
It's often useful to print a value as it is returned. This method
avoids the temporary variable to hold the vaue before it is printed
and then return. I.e.
printer.echo(msg, expr)
instead of
val x = expr
printer.println(msg + x)
x
Diffstat (limited to 'src/dotty/tools/dotc/core')
0 files changed, 0 insertions, 0 deletions