Skip to content

Commit 416aca9

Browse files
committed
Don't print REPL prefixes.
This was already disabled when printing types. Now is also disabled when printing fully qualified names.
1 parent 7107085 commit 416aca9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
5353
nameString(if (sym is ExpandedTypeParam) name.asTypeName.unexpandedName else name)
5454
}
5555

56+
override def fullNameString(sym: Symbol): String =
57+
if (isOmittablePrefix(sym.maybeOwner)) nameString(sym)
58+
else super.fullNameString(sym)
59+
5660
override protected def fullNameOwner(sym: Symbol) = {
5761
val owner = super.fullNameOwner(sym)
5862
if (owner is ModuleClass) owner.sourceModule else owner

0 commit comments

Comments
 (0)