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 {
686
686
687
687
object Context {
688
688
689
- /** Implicit conversion that injects all printer operations into a context */
690
- implicit def toPrinter (ctx : Context ): Printer = ctx.printer
691
-
692
689
/** implicit conversion that injects all ContextBase members into a context */
693
690
implicit def toBase (ctx : Context ): ContextBase = ctx.base
694
691
Original file line number Diff line number Diff line change @@ -1050,7 +1050,7 @@ object Denotations {
1050
1050
/** Show declaration string; useful for showing declarations
1051
1051
* as seen from subclasses.
1052
1052
*/
1053
- def showDcl (implicit ctx : Context ): String = ctx.dclText(this ).show
1053
+ def showDcl (implicit ctx : Context ): String = ctx.printer. dclText(this ).show
1054
1054
1055
1055
override def toString =
1056
1056
if (symbol == NoSymbol ) symbol.toString
Original file line number Diff line number Diff line change @@ -646,12 +646,12 @@ object Symbols {
646
646
647
647
def toText (printer : Printer ): Text = printer.toText(this )
648
648
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 )
655
655
656
656
override def hashCode () = id // for debugging.
657
657
}
Original file line number Diff line number Diff line change @@ -1821,7 +1821,7 @@ object messages {
1821
1821
val kind = " Compatibility"
1822
1822
val msg = " Failure to eliminate existential type. Proceed at own risk."
1823
1823
val explanation = {
1824
- val originalType = ctx.dclsText(boundSyms, " ; " ).show
1824
+ val originalType = ctx.printer. dclsText(boundSyms, " ; " ).show
1825
1825
hl """ original type : $tp forSome ${originalType}
1826
1826
|reduces to : $tp1
1827
1827
|type used instead: $tp2"""
@@ -1961,7 +1961,7 @@ object messages {
1961
1961
1962
1962
val msg = {
1963
1963
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)
1965
1965
val file = denot.symbol.associatedFile
1966
1966
val (location, src) =
1967
1967
if (file != null ) (s " in $file" , file.toString)
You can’t perform that action at this time.
0 commit comments