File tree Expand file tree Collapse file tree 4 files changed +9
-12
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -686,9 +686,6 @@ object Contexts {
686686
687687 object Context {
688688
689- /** Implicit conversion that injects all printer operations into a context */
690- implicit def toPrinter (ctx : Context ): Printer = ctx.printer
691-
692689 /** implicit conversion that injects all ContextBase members into a context */
693690 implicit def toBase (ctx : Context ): ContextBase = ctx.base
694691
Original file line number Diff line number Diff line change @@ -1050,7 +1050,7 @@ object Denotations {
10501050 /** Show declaration string; useful for showing declarations
10511051 * as seen from subclasses.
10521052 */
1053- def showDcl (implicit ctx : Context ): String = ctx.dclText(this ).show
1053+ def showDcl (implicit ctx : Context ): String = ctx.printer. dclText(this ).show
10541054
10551055 override def toString =
10561056 if (symbol == NoSymbol ) symbol.toString
Original file line number Diff line number Diff line change @@ -646,12 +646,12 @@ object Symbols {
646646
647647 def toText (printer : Printer ): Text = printer.toText(this )
648648
649- def showLocated (implicit ctx : Context ): String = ctx.locatedText(this ).show
650- def showExtendedLocation (implicit ctx : Context ): String = ctx.extendedLocationText(this ).show
651- def showDcl (implicit ctx : Context ): String = ctx.dclText(this ).show
652- def showKind (implicit ctx : Context ): String = ctx.kindString(this )
653- def showName (implicit ctx : Context ): String = ctx.nameString(this )
654- def showFullName (implicit ctx : Context ): String = ctx.fullNameString(this )
649+ def showLocated (implicit ctx : Context ): String = ctx.printer. locatedText(this ).show
650+ def showExtendedLocation (implicit ctx : Context ): String = ctx.printer. extendedLocationText(this ).show
651+ def showDcl (implicit ctx : Context ): String = ctx.printer. dclText(this ).show
652+ def showKind (implicit ctx : Context ): String = ctx.printer. kindString(this )
653+ def showName (implicit ctx : Context ): String = ctx.printer. nameString(this )
654+ def showFullName (implicit ctx : Context ): String = ctx.printer. fullNameString(this )
655655
656656 override def hashCode () = id // for debugging.
657657 }
Original file line number Diff line number Diff line change @@ -1821,7 +1821,7 @@ object messages {
18211821 val kind = " Compatibility"
18221822 val msg = " Failure to eliminate existential type. Proceed at own risk."
18231823 val explanation = {
1824- val originalType = ctx.dclsText(boundSyms, " ; " ).show
1824+ val originalType = ctx.printer. dclsText(boundSyms, " ; " ).show
18251825 hl """ original type : $tp forSome ${originalType}
18261826 |reduces to : $tp1
18271827 |type used instead: $tp2"""
@@ -1961,7 +1961,7 @@ object messages {
19611961
19621962 val msg = {
19631963 val denotationOwner = denot.owner
1964- val denotationName = ctx.fresh.setSetting(ctx.settings.YdebugNames , true ).nameString(denot.name)
1964+ val denotationName = ctx.fresh.setSetting(ctx.settings.YdebugNames , true ).printer. nameString(denot.name)
19651965 val file = denot.symbol.associatedFile
19661966 val (location, src) =
19671967 if (file != null ) (s " in $file" , file.toString)
You can’t perform that action at this time.
0 commit comments