File tree 4 files changed +9
-12
lines changed
compiler/src/dotty/tools/dotc 4 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -684,9 +684,6 @@ object Contexts {
684
684
685
685
object Context {
686
686
687
- /** Implicit conversion that injects all printer operations into a context */
688
- implicit def toPrinter (ctx : Context ): Printer = ctx.printer
689
-
690
687
/** implicit conversion that injects all ContextBase members into a context */
691
688
implicit def toBase (ctx : Context ): ContextBase = ctx.base
692
689
Original file line number Diff line number Diff line change @@ -1047,7 +1047,7 @@ object Denotations {
1047
1047
/** Show declaration string; useful for showing declarations
1048
1048
* as seen from subclasses.
1049
1049
*/
1050
- def showDcl (implicit ctx : Context ): String = ctx.dclText(this ).show
1050
+ def showDcl (implicit ctx : Context ): String = ctx.printer. dclText(this ).show
1051
1051
1052
1052
override def toString =
1053
1053
if (symbol == NoSymbol ) symbol.toString
Original file line number Diff line number Diff line change @@ -625,12 +625,12 @@ object Symbols {
625
625
626
626
def toText (printer : Printer ): Text = printer.toText(this )
627
627
628
- def showLocated (implicit ctx : Context ): String = ctx.locatedText(this ).show
629
- def showExtendedLocation (implicit ctx : Context ): String = ctx.extendedLocationText(this ).show
630
- def showDcl (implicit ctx : Context ): String = ctx.dclText(this ).show
631
- def showKind (implicit ctx : Context ): String = ctx.kindString(this )
632
- def showName (implicit ctx : Context ): String = ctx.nameString(this )
633
- def showFullName (implicit ctx : Context ): String = ctx.fullNameString(this )
628
+ def showLocated (implicit ctx : Context ): String = ctx.printer. locatedText(this ).show
629
+ def showExtendedLocation (implicit ctx : Context ): String = ctx.printer. extendedLocationText(this ).show
630
+ def showDcl (implicit ctx : Context ): String = ctx.printer. dclText(this ).show
631
+ def showKind (implicit ctx : Context ): String = ctx.printer. kindString(this )
632
+ def showName (implicit ctx : Context ): String = ctx.printer. nameString(this )
633
+ def showFullName (implicit ctx : Context ): String = ctx.printer. fullNameString(this )
634
634
635
635
override def hashCode () = id // for debugging.
636
636
}
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