diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-04-08 12:23:58 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-04-08 12:23:58 -0700 |
commit | 338f3853f00acab67f74b17d33d0b7bf2b089900 (patch) | |
tree | 328edd4f380de34bc97fd46affd32c6430cd6ac0 /src | |
parent | 476eef82dfed90278de45739ca72819b1b4be5a4 (diff) | |
parent | bb9bce7587855155ee29b93057bd763cfa4c76a6 (diff) | |
download | scala-338f3853f00acab67f74b17d33d0b7bf2b089900.tar.gz scala-338f3853f00acab67f74b17d33d0b7bf2b089900.tar.bz2 scala-338f3853f00acab67f74b17d33d0b7bf2b089900.zip |
Merge pull request #4438 from retronym/topic/plugin-api-regression
Fix regression in plugin API
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/plugins/Plugin.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/plugins/Plugin.scala b/src/compiler/scala/tools/nsc/plugins/Plugin.scala index 5a7a0df595..1a5529140c 100644 --- a/src/compiler/scala/tools/nsc/plugins/Plugin.scala +++ b/src/compiler/scala/tools/nsc/plugins/Plugin.scala @@ -60,13 +60,15 @@ abstract class Plugin { * @return true to continue, or false to opt out */ def init(options: List[String], error: String => Unit): Boolean = { - if (!options.isEmpty) error(s"Error: $name takes no options") + // call to deprecated method required here, we must continue to support + // code that subclasses that override `processOptions`. + processOptions(options, error) true } @deprecated("use Plugin#init instead", since="2.11") def processOptions(options: List[String], error: String => Unit): Unit = { - init(options, error) + if (!options.isEmpty) error(s"Error: $name takes no options") } /** A description of this plugin's options, suitable as a response |