File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/printing Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
426426 def toText (sym : Symbol ): Text =
427427 (kindString(sym) ~~ {
428428 if (sym.isAnonymousClass) toTextParents(sym.info.parents) ~~ " {...}"
429- else if (hasMeaninglessName(sym)) simpleNameString(sym.owner) + idString(sym)
429+ else if (hasMeaninglessName(sym) && ! printDebug ) simpleNameString(sym.owner) + idString(sym)
430430 else nameString(sym)
431431 }).close
432432
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
9393 tp match {
9494 case tp : ThisType if ! printDebug =>
9595 if (tp.cls.isAnonymousClass) return keywordStr(" this" )
96- if (tp.cls is ModuleClass ) return fullNameString(tp.cls.sourceModule)
96+ if (tp.cls.is( ModuleClass ) ) return fullNameString(tp.cls.sourceModule)
9797 case _ =>
9898 }
9999 super .toTextRef(tp)
@@ -841,7 +841,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
841841 case _ =>
842842 }
843843 def name =
844- if (sym.is(ModuleClass ) && sym.isPackageObject && sym.name.stripModuleClassSuffix == tpnme.PACKAGE )
844+ if (printDebug)
845+ nameString(sym)
846+ else if (sym.is(ModuleClass ) && sym.isPackageObject && sym.name.stripModuleClassSuffix == tpnme.PACKAGE )
845847 nameString(sym.owner.name)
846848 else if (sym.is(ModuleClass ))
847849 nameString(sym.name.stripModuleClassSuffix)
You can’t perform that action at this time.
0 commit comments