File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -260,5 +260,9 @@ class TypeUtils:
260260
261261 self.decl(nme.CONSTRUCTOR ).altsWith(isApplicable).map(_.symbol)
262262
263+ def showRef (using Context ): String = self match
264+ case self : SingletonType => ctx.printer.toTextRef(self).show
265+ case _ => self.show
266+
263267end TypeUtils
264268
Original file line number Diff line number Diff line change @@ -558,8 +558,8 @@ object Implicits:
558558 var str1 = err.refStr(alt1.ref)
559559 var str2 = err.refStr(alt2.ref)
560560 if str1 == str2 then
561- str1 = ctx.printer.toTextRef( alt1.ref).show
562- str2 = ctx.printer.toTextRef( alt2.ref).show
561+ str1 = alt1.ref.showRef
562+ str2 = alt2.ref.showRef
563563 em " both $str1 and $str2 $qualify" .withoutDisambiguation()
564564
565565 override def toAdd (using Context ) =
@@ -1728,7 +1728,7 @@ trait Implicits:
17281728 " argument"
17291729
17301730 def showResult (r : SearchResult ) = r match
1731- case r : SearchSuccess => ctx.printer.toTextRef( r.ref).show
1731+ case r : SearchSuccess => r.ref.showRef
17321732 case r => r.show
17331733
17341734 result match
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ trait ImportSuggestions:
336336 if ref.symbol.is(ExtensionMethod ) then
337337 s " ${ctx.printer.toTextPrefixOf(ref).show}${ref.symbol.name}"
338338 else
339- ctx.printer.toTextRef( ref).show
339+ ref.showRef
340340 s " import $imported"
341341 val suggestions = suggestedRefs
342342 .zip(suggestedRefs.map(importString))
You can’t perform that action at this time.
0 commit comments