File tree 2 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/printing
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 {
429
429
def toText (sym : Symbol ): Text =
430
430
(kindString(sym) ~~ {
431
431
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)
433
433
else nameString(sym)
434
434
}).close
435
435
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
93
93
tp match {
94
94
case tp : ThisType if ! printDebug =>
95
95
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)
97
97
case _ =>
98
98
}
99
99
super .toTextRef(tp)
@@ -851,7 +851,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
851
851
case _ =>
852
852
}
853
853
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 )
855
857
nameString(sym.owner.name)
856
858
else if (sym.is(ModuleClass ))
857
859
nameString(sym.name.stripModuleClassSuffix)
You can’t perform that action at this time.
0 commit comments