Skip to content

Commit b544090

Browse files
committed
Remove trailing spaces in printing class body
1 parent 982deae commit b544090

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
776776
params ::: rest
777777
} else impl.body
778778

779-
val bodyText = " {" ~~ selfText ~~ toTextGlobal(primaryConstrs ::: body, "\n") ~ "}"
779+
val bodyText = " {" ~~ selfText ~ toTextGlobal(primaryConstrs ::: body, "\n") ~ "}"
780780

781781
prefix ~
782782
keywordText(" extends").provided(!ofNew && impl.parents.nonEmpty) ~~ parentsText ~

tests/printing/i620.check

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
result of tests/printing/i620.scala after frontend:
12
package O {
23
package O.A {
34
class D() extends Object() {
@@ -26,4 +27,4 @@ package O {
2627
val g: Int = 0
2728
}
2829
}
29-
}
30+
}

0 commit comments

Comments
 (0)