summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings/MutableSettings.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-30 00:55:20 +0000
committerPaul Phillips <paulp@improving.org>2011-03-30 00:55:20 +0000
commit5691a3900dd81cfaaa25e618828d854bed277039 (patch)
tree014c34fd8d33ecd3a368841c3c5380e76aa5987b /src/compiler/scala/tools/nsc/settings/MutableSettings.scala
parentf21113d28ae0fa4bae1f405933991c323f5f5553 (diff)
downloadscala-5691a3900dd81cfaaa25e618828d854bed277039.tar.gz
scala-5691a3900dd81cfaaa25e618828d854bed277039.tar.bz2
scala-5691a3900dd81cfaaa25e618828d854bed277039.zip
Wanting to deprecate -make, first I had to writ...
Wanting to deprecate -make, first I had to write a way to deprecate -make. So there's that, now you can do val s = SomeSetting(...) withDeprecationMessage "don't use this" And it will do the usual deprecation things. And, deprecated -make. And couldn't resist fixing a bug in -make, it would crash if you gave it its own default option (i.e. -make:all.) Let's deprecate more! I also did further cleaning up of our help outputs. Do I smell a pulitzer in the making? No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/settings/MutableSettings.scala')
-rw-r--r--src/compiler/scala/tools/nsc/settings/MutableSettings.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala
index 12b9ef7154..a4a0cd3867 100644
--- a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala
@@ -345,6 +345,10 @@ class MutableSettings(val errorFn: String => Unit) extends AbsSettings with Scal
private var dependency: Option[(Setting, String)] = None
override def dependencies = dependency.toList
def dependsOn(s: Setting, value: String): this.type = { dependency = Some((s, value)); this }
+
+ private var _deprecationMessage: Option[String] = None
+ override def deprecationMessage = _deprecationMessage
+ def withDeprecationMessage(msg: String): this.type = { _deprecationMessage = Some(msg) ; this }
}
/** A setting represented by an integer */