File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/dotty/tools/dotc/printing Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
4545
4646 override def nameString (name : Name ): String = name.decode.toString
4747
48- override protected def simpleNameString (sym : Symbol ): String =
49- sym.name.decode.toString
48+ override protected def simpleNameString (sym : Symbol ): String = {
49+ val name = sym.originalName
50+ nameString(if (sym is ExpandedTypeParam ) name.asTypeName.unexpandedName else name)
51+ }
5052
5153 override protected def fullNameOwner (sym : Symbol ) = {
5254 val owner = super .fullNameOwner(sym)
@@ -86,10 +88,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
8688 else {
8789 val tsym = tp.parent.member(tp.refinedName).symbol
8890 if (! tsym.exists) super .refinementNameString(tp)
89- else {
90- val name = tsym.originalName
91- nameString(if (tsym is ExpandedTypeParam ) name.asTypeName.unexpandedName else name)
92- }
91+ else simpleNameString(tsym)
9392 }
9493
9594 override def toText (tp : Type ): Text = controlled {
You can’t perform that action at this time.
0 commit comments