Skip to content

Commit c0fdd62

Browse files
committed
Revert replacement in trace
`trace` is made for multi-line output, since it has to show large parts of programs accurately. Replacing newline with space does not work here. It messes up the layout and changes the meaning of code.
1 parent 8e529b1 commit c0fdd62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/reporting/trace.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ trait TraceSyntax:
7676
else
7777
// Avoid evaluating question multiple time, since each evaluation
7878
// may cause some extra logging output.
79-
val q = question.replace('\n', ' ')
79+
val q = question
8080
val leading = s"==> $q?"
8181
val trailing = (res: T) => s"<== $q = ${showOp(res)}"
8282
var finalized = false

0 commit comments

Comments
 (0)