Skip to content

Commit 5a2dbdd

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

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
result of tests/printing/i620.scala after frontend:
12
package O {
23
package O.A {
3-
class D() extends Object() {
4-
class C() extends Object() {
4+
class D() extends Object() {
5+
class C() extends Object() {
56
protected[D] def a: Int = 0
67
private[D] def b: Int = 0
78
private def c: Int = 0
@@ -26,4 +27,4 @@ package O {
2627
val g: Int = 0
2728
}
2829
}
29-
}
30+
}

0 commit comments

Comments
 (0)