Skip to content

Commit 2a91274

Browse files
committed
Don't drop module class suffix in RefinedPrinter
Don't drop the module class suffix `$` in RefinedPrinter.simpleNameString. We do this in ExplainingPrinter instead, where we also take compensations to explain that this is an object.
1 parent b34ea5d commit 2a91274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
7878
if (ctx.settings.YdebugNames.value) name.debugString else NameTransformer.decodeIllegalChars(name.toString)
7979

8080
override protected def simpleNameString(sym: Symbol): String =
81-
nameString(if (ctx.property(XprintMode).isEmpty) sym.originalName else sym.name)
81+
nameString(if (ctx.property(XprintMode).isEmpty) sym.initial.name else sym.name)
8282

8383
override def fullNameString(sym: Symbol): String =
8484
if (isEmptyPrefix(sym.maybeOwner)) nameString(sym)

0 commit comments

Comments
 (0)