Skip to content

Commit 3b71003

Browse files
committed
Don't print $ suffixes of module classes
... when printing using RefinedPrinter. PlainPrinter will still show them.
1 parent 416aca9 commit 3b71003

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,10 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
554554
case _ =>
555555
}
556556
}
557-
super.toText(sym)
557+
if (sym.is(ModuleClass))
558+
kindString(sym) ~~ (nameString(sym.name.stripModuleClassSuffix) + idString(sym))
559+
else
560+
super.toText(sym)
558561
}
559562

560563
override def kindString(sym: Symbol) = {

0 commit comments

Comments
 (0)