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 @@ -687,9 +687,6 @@ object Contexts {
687
687
688
688
object Context {
689
689
690
- /** Implicit conversion that injects all printer operations into a context */
691
- implicit def toPrinter (ctx : Context ): Printer = ctx.printer
692
-
693
690
/** implicit conversion that injects all ContextBase members into a context */
694
691
implicit def toBase (ctx : Context ): ContextBase = ctx.base
695
692
Original file line number Diff line number Diff line change @@ -1031,7 +1031,7 @@ object Denotations {
1031
1031
/** Show declaration string; useful for showing declarations
1032
1032
* as seen from subclasses.
1033
1033
*/
1034
- def showDcl (implicit ctx : Context ): String = ctx.dclText(this ).show
1034
+ def showDcl (implicit ctx : Context ): String = ctx.printer. dclText(this ).show
1035
1035
1036
1036
override def toString =
1037
1037
if (symbol == NoSymbol ) symbol.toString
Original file line number Diff line number Diff line change @@ -616,12 +616,12 @@ object Symbols {
616
616
617
617
def toText (printer : Printer ): Text = printer.toText(this )
618
618
619
- def showLocated (implicit ctx : Context ): String = ctx.locatedText(this ).show
620
- def showExtendedLocation (implicit ctx : Context ): String = ctx.extendedLocationText(this ).show
621
- def showDcl (implicit ctx : Context ): String = ctx.dclText(this ).show
622
- def showKind (implicit ctx : Context ): String = ctx.kindString(this )
623
- def showName (implicit ctx : Context ): String = ctx.nameString(this )
624
- def showFullName (implicit ctx : Context ): String = ctx.fullNameString(this )
619
+ def showLocated (implicit ctx : Context ): String = ctx.printer. locatedText(this ).show
620
+ def showExtendedLocation (implicit ctx : Context ): String = ctx.printer. extendedLocationText(this ).show
621
+ def showDcl (implicit ctx : Context ): String = ctx.printer. dclText(this ).show
622
+ def showKind (implicit ctx : Context ): String = ctx.printer. kindString(this )
623
+ def showName (implicit ctx : Context ): String = ctx.printer. nameString(this )
624
+ def showFullName (implicit ctx : Context ): String = ctx.printer. fullNameString(this )
625
625
626
626
override def hashCode () = id // for debugging.
627
627
}
Original file line number Diff line number Diff line change @@ -1838,7 +1838,7 @@ object messages {
1838
1838
val kind = " Compatibility"
1839
1839
val msg = " Failure to eliminate existential type. Proceed at own risk."
1840
1840
val explanation = {
1841
- val originalType = ctx.dclsText(boundSyms, " ; " ).show
1841
+ val originalType = ctx.printer. dclsText(boundSyms, " ; " ).show
1842
1842
hl """ original type : $tp forSome ${originalType}
1843
1843
|reduces to : $tp1
1844
1844
|type used instead: $tp2"""
@@ -1978,7 +1978,7 @@ object messages {
1978
1978
1979
1979
val msg = {
1980
1980
val denotationOwner = denot.owner
1981
- val denotationName = ctx.fresh.setSetting(ctx.settings.YdebugNames , true ).nameString(denot.name)
1981
+ val denotationName = ctx.fresh.setSetting(ctx.settings.YdebugNames , true ).printer. nameString(denot.name)
1982
1982
val file = denot.symbol.associatedFile
1983
1983
val (location, src) =
1984
1984
if (file != null ) (s " in $file" , file.toString)
You can’t perform that action at this time.
0 commit comments