@@ -66,18 +66,18 @@ object Reporter {
6666 }
6767}
6868
69- trait Reporting { this : Context =>
69+ trait Reporting { thisCtx : Context =>
7070
7171 /** For sending messages that are printed only if -verbose is set */
7272 def inform (msg : => String , pos : SourcePosition = NoSourcePosition ): Unit =
73- if (this .settings.verbose.value) this .echo(msg, pos)
73+ if (thisCtx .settings.verbose.value) thisCtx .echo(msg, pos)
7474
7575 def echo (msg : => String , pos : SourcePosition = NoSourcePosition ): Unit =
7676 reporter.report(new Info (msg, pos))
7777
7878 def reportWarning (warning : Warning ): Unit =
79- if (! this .settings.silentWarnings.value)
80- if (this .settings.XfatalWarnings .value)
79+ if (! thisCtx .settings.silentWarnings.value)
80+ if (thisCtx .settings.XfatalWarnings .value)
8181 warning match {
8282 case warning : ConditionalWarning if ! warning.enablingOption.value =>
8383 reporter.report(warning) // conditional warnings that are not enabled are not fatal
@@ -123,23 +123,23 @@ trait Reporting { this: Context =>
123123 reportWarning(new Warning (msg, addInlineds(pos)))
124124
125125 def strictWarning (msg : Message , pos : SourcePosition = NoSourcePosition ): Unit =
126- if (this .settings.strict.value) error(msg, pos)
126+ if (thisCtx .settings.strict.value) error(msg, pos)
127127 else warning(msg.append(" \n (This would be an error under strict mode)" ), pos)
128128
129129 def error (msg : Message , pos : SourcePosition = NoSourcePosition , sticky : Boolean = false ): Unit = {
130130 val fullPos = addInlineds(pos)
131131 reporter.report(if (sticky) new StickyError (msg, fullPos) else new Error (msg, fullPos))
132- if ctx .settings.YdebugError .value then Thread .dumpStack()
132+ if thisCtx .settings.YdebugError .value then Thread .dumpStack()
133133 }
134134
135135 def error (ex : TypeError , pos : SourcePosition ): Unit = {
136136 error(ex.toMessage, pos, sticky = true )
137- if (ctx .settings.YdebugTypeError .value)
137+ if (thisCtx .settings.YdebugTypeError .value)
138138 ex.printStackTrace()
139139 }
140140
141141 def errorOrMigrationWarning (msg : Message , pos : SourcePosition = NoSourcePosition ): Unit =
142- if (ctx .scala2CompatMode) migrationWarning(msg, pos) else error(msg, pos)
142+ if (thisCtx .scala2CompatMode) migrationWarning(msg, pos) else error(msg, pos)
143143
144144 def restrictionError (msg : Message , pos : SourcePosition = NoSourcePosition ): Unit =
145145 error(msg.mapMsg(" Implementation restriction: " + _), pos)
@@ -152,11 +152,11 @@ trait Reporting { this: Context =>
152152 * "contains" here.
153153 */
154154 def log (msg : => String , pos : SourcePosition = NoSourcePosition ): Unit =
155- if (this .settings.Ylog .value.containsPhase(phase))
156- echo(s " [log ${ctx .phasesStack.reverse.mkString(" -> " )}] $msg" , pos)
155+ if (thisCtx .settings.Ylog .value.containsPhase(phase))
156+ echo(s " [log ${thisCtx .phasesStack.reverse.mkString(" -> " )}] $msg" , pos)
157157
158158 def debuglog (msg : => String ): Unit =
159- if (ctx .debug) log(msg)
159+ if (thisCtx .debug) log(msg)
160160
161161 def informTime (msg : => String , start : Long ): Unit = {
162162 def elapsed = s " in ${currentTimeMillis - start}ms "
@@ -172,7 +172,7 @@ trait Reporting { this: Context =>
172172 }
173173
174174 def debugwarn (msg : => String , pos : SourcePosition = NoSourcePosition ): Unit =
175- if (this .settings.Ydebug .value) warning(msg, pos)
175+ if (thisCtx .settings.Ydebug .value) warning(msg, pos)
176176
177177 private def addInlineds (pos : SourcePosition )(implicit ctx : Context ) = {
178178 def recur (pos : SourcePosition , inlineds : List [Trees .Tree [? ]]): SourcePosition = inlineds match {
0 commit comments