Skip to content

Commit 983ed63

Browse files
committed
-Yplain-printer: do not print positions by default
You can still have positions printed by explictly passing -Yprintpos
1 parent 4f15021 commit 983ed63

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,11 @@ class PlainPrinter(_ctx: Context) extends Printer {
483483
else
484484
Text()
485485

486-
nodeName ~ "(" ~ elems ~ tpSuffix ~ ")" ~ node.pos.toString
486+
val text = nodeName ~ "(" ~ elems ~ tpSuffix ~ ")"
487+
if (ctx.settings.Yprintpos.value)
488+
text ~ node.pos.toString
489+
else
490+
text
487491
case _ =>
488492
tree.fallbackToText(this)
489493
}

0 commit comments

Comments
 (0)