Skip to content

Commit 8457680

Browse files
committed
Fix trailing space in error message
1 parent 5d863fb commit 8457680

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ trait MessageRendering {
104104
}
105105

106106
msg.linesIterator
107-
.map { line => " " * (offset - 1) + "|" + padding + line}
107+
.map { line => " " * (offset - 1) + "|" + (if line.isEmpty then "" else padding + line) }
108108
.mkString(EOL)
109109
}
110110

tests/neg-macros/i6976.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
| Exception occurred while executing macro expansion.
66
| scala.MatchError: Inlined(EmptyTree,List(),Literal(Constant(2))) (of class dotty.tools.dotc.ast.Trees$Inlined)
77
| at playground.macros$.mcrImpl(Macro_1.scala:12)
8-
|
8+
|
99
| This location is in code that was inlined at Test_2.scala:5

0 commit comments

Comments
 (0)