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
15
15
import scala .annotation .switch
16
16
17
17
class PlainPrinter (_ctx : Context ) extends Printer {
18
+ /** The context of all public methods in Printer and subclasses.
19
+ * Overridden in RefinedPrinter.
20
+ */
18
21
protected implicit def ctx : Context = _ctx.addMode(Mode .Printing )
22
+
19
23
protected def printDebug = ctx.settings.YprintDebug .value
20
24
21
25
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) {
714
714
}
715
715
716
716
/** 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 =
718
718
new untpd.ModsDecorator {
719
719
def mods = if (mdef.hasType) Modifiers (mdef.symbol) else mdef.rawMods
720
720
}
721
721
722
- def Modifiers (sym : Symbol )( implicit ctx : Context ): Modifiers = untpd.Modifiers (
722
+ private def Modifiers (sym : Symbol ): Modifiers = untpd.Modifiers (
723
723
sym.flags & (if (sym.isType) ModifierFlags | VarianceFlags else ModifierFlags ),
724
724
if (sym.privateWithin.exists) sym.privateWithin.asType.name else tpnme.EMPTY ,
725
725
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 {
346
346
* no later than erasure.
347
347
*/
348
348
class OuterOps (val ictx : Context ) extends AnyVal {
349
+ /** The context of all operations of this class */
349
350
private implicit def ctx : Context = ictx
350
351
351
352
/** 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