summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2015-05-05 13:52:22 -0700
committerSom Snytt <som.snytt@gmail.com>2015-05-05 13:52:22 -0700
commit92f69d253ee6e941263aaf0a09936b4e4ce21dc7 (patch)
tree391dcd89001d0a8d7eb1d862c8e558487483f828 /src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
parent8200009ea5dafcdf79488f19175c53e7b571aa75 (diff)
downloadscala-92f69d253ee6e941263aaf0a09936b4e4ce21dc7.tar.gz
scala-92f69d253ee6e941263aaf0a09936b4e4ce21dc7.tar.bz2
scala-92f69d253ee6e941263aaf0a09936b4e4ce21dc7.zip
SI-9302 -Xdisable-assertions raises elide level
Previously, the flag caused any elidable to be elided. This commit simply sets -Xelide-below to ASSERTION + 1. The flag is useful because there's no mnemonic for specifying the magic constant as an option argument. `-Xelide-below ASSERTION` means asserts are enabled.
Diffstat (limited to 'src/compiler/scala/tools/nsc/settings/ScalaSettings.scala')
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index 630276e412..35ee889c58 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -101,7 +101,8 @@ trait ScalaSettings extends AbsScalaSettings
val Xhelp = BooleanSetting ("-X", "Print a synopsis of advanced options.")
val checkInit = BooleanSetting ("-Xcheckinit", "Wrap field accessors to throw an exception on uninitialized access.")
val developer = BooleanSetting ("-Xdev", "Indicates user is a developer - issue warnings about anything which seems amiss")
- val noassertions = BooleanSetting ("-Xdisable-assertions", "Generate no assertions or assumptions.")
+ val noassertions = BooleanSetting ("-Xdisable-assertions", "Generate no assertions or assumptions.") andThen (flag =>
+ if (flag) elidebelow.value = elidable.ASSERTION + 1)
val elidebelow = IntSetting ("-Xelide-below", "Calls to @elidable methods are omitted if method priority is lower than argument",
elidable.MINIMUM, None, elidable.byName get _)
val noForwarders = BooleanSetting ("-Xno-forwarders", "Do not generate static forwarders in mirror classes.")