summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-11-14 16:46:51 +0000
committerPaul Phillips <paulp@improving.org>2010-11-14 16:46:51 +0000
commitff5acd0dbb714445d01c0347beace11c735ea231 (patch)
tree9d2fb6ba65eb25a08dd0c1a6bb1e26b1623bff52
parent298738e95935563c302d4a15cef8207c4f15be97 (diff)
downloadscala-ff5acd0dbb714445d01c0347beace11c735ea231.tar.gz
scala-ff5acd0dbb714445d01c0347beace11c735ea231.tar.bz2
scala-ff5acd0dbb714445d01c0347beace11c735ea231.zip
Fixed -Xexperimental and other settings so that...
Fixed -Xexperimental and other settings so that setting them false will falsify the associated options rather than truify them. No review.
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index 2c767d2e78..d47aff0327 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -39,7 +39,7 @@ trait ScalaSettings extends AbsScalaSettings with StandardScalaSettings {
val defines = DefinesSetting()
val optimise = BooleanSetting ("-optimise", "Generates faster bytecode by applying optimisations to the program") .
withAbbreviation("-optimize") .
- withPostSetHook(_ => List(inline, Xcloselim, Xdce) foreach (_.value = true))
+ withPostSetHook(set => List(inline, Xcloselim, Xdce) foreach (_.value = set.value))
val nospecialization = BooleanSetting ("-no-specialization", "Ignore @specialize annotations.")
@@ -85,7 +85,7 @@ trait ScalaSettings extends AbsScalaSettings with StandardScalaSettings {
// Experimental Extensions
val Xexperimental = BooleanSetting ("-Xexperimental", "Enable experimental extensions") .
- withPostSetHook(_ => List(YdepMethTpes, YmethodInfer) foreach (_.value = true)) //YvirtClasses,
+ withPostSetHook(set => List(YdepMethTpes, YmethodInfer) foreach (_.value = set.value)) //YvirtClasses,
val YdepMethTpes = BooleanSetting ("-Ydependent-method-types", "Allow dependent method types")
val YmethodInfer = BooleanSetting ("-Yinfer-argument-types", "Infer types for arguments of overriden methods")
val YvirtClasses = false // too embryonic to even expose as a -Y //BooleanSetting ("-Yvirtual-classes", "Support virtual classes")
@@ -129,7 +129,7 @@ trait ScalaSettings extends AbsScalaSettings with StandardScalaSettings {
val Xsqueeze = ChoiceSetting ("-Ysqueeze", "if on, creates compact code in matching", List("on","off"), "on") .
withHelpSyntax("-Ysqueeze:<enabled>")
val Ystatistics = BooleanSetting ("-Ystatistics", "Print compiler statistics") .
- withPostSetHook(_ => util.Statistics.enabled = true)
+ withPostSetHook(set => util.Statistics.enabled = set.value)
val stop = PhasesSetting ("-Ystop", "Stop after phase")
val refinementMethodDispatch =
ChoiceSetting ("-Ystruct-dispatch", "Selects dispatch method for structural refinement method calls",