File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc/printing Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
7878 protected val PrintableFlags = (SourceModifierFlags | Label | Module | Local ).toCommonFlags
7979
8080 override def nameString (name : Name ): String =
81- if (name.isReplAssignName) name.decode.toString.takeWhile(_ != '$' )
82- else if (ctx.settings.YdebugNames .value) name.debugString
83- else name.toString
81+ if (ctx.settings.YdebugNames .value) name.debugString else name.toString
8482
8583 override protected def simpleNameString (sym : Symbol ): String =
8684 nameString(if (ctx.property(XprintMode ).isEmpty) sym.originalName else sym.name)
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import dotty.tools.dotc.core.Constants.Constant
55import dotty .tools .dotc .core .Contexts ._
66import dotty .tools .dotc .core .Flags ._
77import dotty .tools .dotc .core .NameOps ._
8+ import dotty .tools .dotc .core .Names .Name
89import dotty .tools .dotc .core .Symbols ._
910import dotty .tools .dotc .core .Types .{ExprType , TypeAlias }
1011import dotty .tools .dotc .printing .Texts ._
@@ -13,6 +14,10 @@ import scala.language.implicitConversions
1314
1415class ReplPrinter (_ctx : Context ) extends DecompilerPrinter (_ctx) {
1516
17+ override def nameString (name : Name ): String =
18+ if (name.isReplAssignName) name.decode.toString.takeWhile(_ != '$' )
19+ else super .nameString(name)
20+
1621 override protected def exprToText (tp : ExprType ): Text =
1722 " : " ~ toText(tp.resType)
1823
You can’t perform that action at this time.
0 commit comments