Skip to content

Commit 3b03d8f

Browse files
committed
Fix trailing space in error message
1 parent d438aa5 commit 3b03d8f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
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

tests/neg-macros/macro-class-not-found-1.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
| Exception occurred while executing macro expansion.
55
| java.lang.NoClassDefFoundError
66
| at Foo$.aMacroImplementation(Foo.scala:8)
7-
|
7+
|
88
| This location is in code that was inlined at Bar.scala:4

tests/neg-macros/macro-class-not-found-2.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
| Exception occurred while executing macro expansion.
55
| java.lang.NoClassDefFoundError: this.is.not.a.Class
66
| at Foo$.aMacroImplementation(Foo.scala:8)
7-
|
7+
|
88
| This location is in code that was inlined at Bar.scala:4

0 commit comments

Comments
 (0)