File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ import scala.util.control.NonFatal
1515import scala .annotation .switch
1616
1717class PlainPrinter (_ctx : Context ) extends Printer {
18+ /** The context of all public methods in Printer and subclasses.
19+ * Overridden in RefinedPrinter.
20+ */
1821 protected implicit def ctx : Context = _ctx.addMode(Mode .Printing )
22+
1923 protected def printDebug = ctx.settings.YprintDebug .value
2024
2125 private var openRecs : List [RecType ] = Nil
Original file line number Diff line number Diff line change @@ -714,12 +714,12 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
714714 }
715715
716716 /** Print modifiers from symbols if tree has type, overriding the untpd behavior. */
717- implicit def modsDeco (mdef : untpd.DefTree )( implicit ctx : Context ): untpd.ModsDecorator =
717+ private implicit def modsDeco (mdef : untpd.DefTree ): untpd.ModsDecorator =
718718 new untpd.ModsDecorator {
719719 def mods = if (mdef.hasType) Modifiers (mdef.symbol) else mdef.rawMods
720720 }
721721
722- def Modifiers (sym : Symbol )( implicit ctx : Context ): Modifiers = untpd.Modifiers (
722+ private def Modifiers (sym : Symbol ): Modifiers = untpd.Modifiers (
723723 sym.flags & (if (sym.isType) ModifierFlags | VarianceFlags else ModifierFlags ),
724724 if (sym.privateWithin.exists) sym.privateWithin.asType.name else tpnme.EMPTY ,
725725 sym.annotations.filterNot(ann => dropAnnotForModText(ann.symbol)).map(_.tree))
Original file line number Diff line number Diff line change @@ -346,6 +346,7 @@ object ExplicitOuter {
346346 * no later than erasure.
347347 */
348348 class OuterOps (val ictx : Context ) extends AnyVal {
349+ /** The context of all operations of this class */
349350 private implicit def ctx : Context = ictx
350351
351352 /** If `cls` has an outer parameter add one to the method type `tp`. */
You can’t perform that action at this time.
0 commit comments