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 @@ -429,7 +429,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
429429 def toText (sym : Symbol ): Text =
430430 (kindString(sym) ~~ {
431431 if (sym.isAnonymousClass) toTextParents(sym.info.parents) ~~ " {...}"
432- else if (hasMeaninglessName(sym)) simpleNameString(sym.owner) + idString(sym)
432+ else if (hasMeaninglessName(sym) && ! printDebug ) simpleNameString(sym.owner) + idString(sym)
433433 else nameString(sym)
434434 }).close
435435
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)
@@ -851,7 +851,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
851851 case _ =>
852852 }
853853 def name =
854- if (sym.is(ModuleClass ) && sym.isPackageObject && sym.name.stripModuleClassSuffix == tpnme.PACKAGE )
854+ if (printDebug)
855+ nameString(sym)
856+ else if (sym.is(ModuleClass ) && sym.isPackageObject && sym.name.stripModuleClassSuffix == tpnme.PACKAGE )
855857 nameString(sym.owner.name)
856858 else if (sym.is(ModuleClass ))
857859 nameString(sym.name.stripModuleClassSuffix)
You can’t perform that action at this time.
0 commit comments