aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-10-17 15:43:38 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-17 15:43:38 +0200
commite2ce0dbb695df7ebad37ab41d2dd264c63ee6b36 (patch)
tree99870f37bf9cf83f64a616d18b9329a0d7dc73e4 /src
parent52b6daad86eb9ab5bbeecb2709729d992ee977f7 (diff)
downloaddotty-e2ce0dbb695df7ebad37ab41d2dd264c63ee6b36.tar.gz
dotty-e2ce0dbb695df7ebad37ab41d2dd264c63ee6b36.tar.bz2
dotty-e2ce0dbb695df7ebad37ab41d2dd264c63ee6b36.zip
Keep position always with term
When printing with -Yprintpos always have the position follow immediately the term with the position. Makes it easier to interpret diffs.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index 91a789aef..8b34b3ef8 100644
--- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -527,7 +527,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
}
if (ctx.settings.Yprintpos.value && !tree.isInstanceOf[WithoutTypeOrPos[_]]) {
val pos = if (homogenizedView) tree.pos.toSynthetic else tree.pos
- txt = txt ~ "@" ~ pos.toString
+ txt = (txt ~ "@" ~ pos.toString).close
}
tree match {
case Block(_, _) | Template(_, _, _, _) => txt