File tree 2 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc/printing 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) {
78
78
protected val PrintableFlags = (SourceModifierFlags | Label | Module | Local ).toCommonFlags
79
79
80
80
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
84
82
85
83
override protected def simpleNameString (sym : Symbol ): String =
86
84
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
5
5
import dotty .tools .dotc .core .Contexts ._
6
6
import dotty .tools .dotc .core .Flags ._
7
7
import dotty .tools .dotc .core .NameOps ._
8
+ import dotty .tools .dotc .core .Names .Name
8
9
import dotty .tools .dotc .core .Symbols ._
9
10
import dotty .tools .dotc .core .Types .{ExprType , TypeAlias }
10
11
import dotty .tools .dotc .printing .Texts ._
@@ -13,6 +14,10 @@ import scala.language.implicitConversions
13
14
14
15
class ReplPrinter (_ctx : Context ) extends DecompilerPrinter (_ctx) {
15
16
17
+ override def nameString (name : Name ): String =
18
+ if (name.isReplAssignName) name.decode.toString.takeWhile(_ != '$' )
19
+ else super .nameString(name)
20
+
16
21
override protected def exprToText (tp : ExprType ): Text =
17
22
" : " ~ toText(tp.resType)
18
23
You can’t perform that action at this time.
0 commit comments