diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-07 10:14:57 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-08 09:48:35 +0200 |
commit | 532ef331eb050454d33a3063b48b581db874d57a (patch) | |
tree | de92a3cbbf5e2256c2c8dc480a20aaf9a395d55e /src | |
parent | 75ac2250156dc36f072d44b82b5b82dc155691d8 (diff) | |
download | scala-532ef331eb050454d33a3063b48b581db874d57a.tar.gz scala-532ef331eb050454d33a3063b48b581db874d57a.tar.bz2 scala-532ef331eb050454d33a3063b48b581db874d57a.zip |
Restore reporter forwarders in CompilationUnit
Deprecate them so that we can remove them in a couple of 2.11.x releases.
Plenty of plugins were probably using `unit.error` et al.
The continuations plugin was, for one (remedying this with pending PR).
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompilationUnits.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilationUnits.scala b/src/compiler/scala/tools/nsc/CompilationUnits.scala index 1ad206f519..f23bca77cd 100644 --- a/src/compiler/scala/tools/nsc/CompilationUnits.scala +++ b/src/compiler/scala/tools/nsc/CompilationUnits.scala @@ -123,8 +123,21 @@ trait CompilationUnits { global: Global => */ val icode: LinkedHashSet[icodes.IClass] = new LinkedHashSet + @deprecated("Call global.reporter.echo directly instead.", "2.11.2") + final def echo(pos: Position, msg: String): Unit = reporter.echo(pos, msg) + @deprecated("Call global.reporter.error (or typer.context.error) directly instead.", "2.11.2") + final def error(pos: Position, msg: String): Unit = reporter.error(pos, msg) + @deprecated("Call global.reporter.warning (or typer.context.warning) directly instead.", "2.11.2") + final def warning(pos: Position, msg: String): Unit = reporter.warning(pos, msg) + + @deprecated("Call global.currentRun.reporting.deprecationWarning directly instead.", "2.11.2") + final def deprecationWarning(pos: Position, msg: String): Unit = currentRun.reporting.deprecationWarning(pos, msg) + @deprecated("Call global.currentRun.reporting.uncheckedWarning directly instead.", "2.11.2") + final def uncheckedWarning(pos: Position, msg: String): Unit = currentRun.reporting.uncheckedWarning(pos, msg) + // called by ScalaDocAnalyzer, overridden by the IDE (in Reporter) // TODO: don't use reporter to communicate comments from parser to IDE! + @deprecated("This method will be removed.", "2.11.2") final def comment(pos: Position, msg: String): Unit = reporter.comment(pos, msg) |