Skip to content

Commit fc3ffb6

Browse files
Fix spacing after toTextParents
1 parent 49b387f commit fc3ffb6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
343343
val declsText =
344344
if (trueDecls.isEmpty || !ctx.settings.Ydebug.value) Text()
345345
else dclsText(trueDecls)
346-
tparamsText ~ " extends " ~ toTextParents(tp.parents) ~ "{" ~ selfText ~ declsText ~
346+
tparamsText ~ " extends " ~ toTextParents(tp.parents) ~~ "{" ~ selfText ~ declsText ~
347347
"} at " ~ preText
348348
case mt: MethodType =>
349349
toTextGlobal(mt)
@@ -424,7 +424,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
424424

425425
def toText(sym: Symbol): Text =
426426
(kindString(sym) ~~ {
427-
if (sym.isAnonymousClass) toText(sym.info.parents, " with ") ~ "{...}"
427+
if (sym.isAnonymousClass) toTextParents(sym.info.parents) ~~ "{...}"
428428
else if (hasMeaninglessName(sym)) simpleNameString(sym.owner) + idString(sym)
429429
else nameString(sym)
430430
}).close

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
212212
case ErasedValueType(tycon, underlying) =>
213213
return "ErasedValueType(" ~ toText(tycon) ~ ", " ~ toText(underlying) ~ ")"
214214
case tp: ClassInfo =>
215-
return toTextParents(tp.parents) ~ "{...}"
215+
return toTextParents(tp.parents) ~~ "{...}"
216216
case JavaArrayType(elemtp) =>
217217
return toText(elemtp) ~ "[]"
218218
case tp: AnnotatedType if homogenizedView =>

0 commit comments

Comments
 (0)