diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-09-13 13:33:05 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2017-03-11 23:38:08 -0800 |
commit | 1b415c904bece230a706c0d19462345fc87abf67 (patch) | |
tree | 7b7e629563a52f5b92884a95bd63dbc0d3978975 /src/compiler/scala/tools/reflect/FormatInterpolator.scala | |
parent | f672aff3f3b92506741b62d8f7eae6d1e0dc36a7 (diff) | |
download | scala-1b415c904bece230a706c0d19462345fc87abf67.tar.gz scala-1b415c904bece230a706c0d19462345fc87abf67.tar.bz2 scala-1b415c904bece230a706c0d19462345fc87abf67.zip |
SI-8040 Heeding -Ywarn-unused
Polish notation, as in shoe-shine, as recommended by
the warning.
Minor clean-ups as advocated by `Ywarn-unused` and `Xlint`.
Diffstat (limited to 'src/compiler/scala/tools/reflect/FormatInterpolator.scala')
-rw-r--r-- | src/compiler/scala/tools/reflect/FormatInterpolator.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/reflect/FormatInterpolator.scala b/src/compiler/scala/tools/reflect/FormatInterpolator.scala index 9825acd39f..bbb2987679 100644 --- a/src/compiler/scala/tools/reflect/FormatInterpolator.scala +++ b/src/compiler/scala/tools/reflect/FormatInterpolator.scala @@ -19,7 +19,7 @@ abstract class FormatInterpolator { @inline private def truly(body: => Unit): Boolean = { body ; true } @inline private def falsely(body: => Unit): Boolean = { body ; false } - private def fail(msg: String) = c.abort(c.enclosingPosition, msg) + //private def fail(msg: String) = c.abort(c.enclosingPosition, msg) private def bail(msg: String) = global.abort(msg) def interpolate: Tree = c.macroApplication match { @@ -93,8 +93,8 @@ abstract class FormatInterpolator { case '\n' => "\\n" case '\f' => "\\f" case '\r' => "\\r" - case '\"' => "${'\"'}" /* avoid lint warn */ + - " or a triple-quoted literal \"\"\"with embedded \" or \\u0022\"\"\"" // $" in future + case '\"' => "$" /* avoid lint warn */ + + "{'\"'} or a triple-quoted literal \"\"\"with embedded \" or \\u0022\"\"\"" // $" in future? case '\'' => "'" case '\\' => """\\""" case x => "\\u%04x" format x |