scala/scala — pull request #2701 by som-snytt (2013-07-03 10:50:52+00:00)
Title: SI-4594 Repl settings command

Make it possible to turn settings on and off in repl.

To that end, also fixes minor crash:
```
apm@mara:~/tmp$ scalac -Ylog:-1-2 source.scala
[snip]
Caused by: java.lang.NumberFormatException: For input string: "1-2"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at scala.collection.immutable.StringLike$class.toInt(StringLike.scala:229)
at scala.collection.immutable.StringOps.toInt(StringOps.scala:31)
at scala.tools.nsc.settings.MutableSettings$PhasesSetting$$anonfun$scala$tools$nsc$settings$MutableSettings$PhasesSetting$$stringToPhaseIdTest$2.apply$mcZI$sp(MutableSettings.scala:639)
at scala.tools.nsc.settings.MutableSettings$PhasesSetting.containsId(MutableSettings.scala:664)
at scala.tools.nsc.settings.MutableSettings$PhasesSetting.containsPhase(MutableSettings.scala:665)
at scala.tools.nsc.Global.shouldLogAtThisPhase(Global.scala:282)
at scala.tools.selectivecps.SelectiveCPSPlugin.(SelectiveCPSPlugin.scala:38)
```

Sample:
```
scala> :settings +deprecation

scala> new BigInt(java.math.BigInteger.TEN) { }
:8: warning: inheritance from class BigInt in package math is deprecated: This class will me made final.
new BigInt(java.math.BigInteger.TEN) { }
^
res0: BigInt = 10

scala> :settings -deprecation
```