summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Settings.scala
diff options
context:
space:
mode:
authorEugene Burmako <burmako@epfl.ch>2011-11-28 13:37:52 +0000
committerEugene Burmako <burmako@epfl.ch>2011-11-28 13:37:52 +0000
commit4e987a3cf032eb176c20bf3fd5ac847a73b19c00 (patch)
tree41b2cc06372010f9d30a671d46bf504aa3f9bc05 /src/compiler/scala/tools/nsc/Settings.scala
parent66bf8db3f115675377d82869fddcab6006adf04d (diff)
downloadscala-4e987a3cf032eb176c20bf3fd5ac847a73b19c00.tar.gz
scala-4e987a3cf032eb176c20bf3fd5ac847a73b19c00.tar.bz2
scala-4e987a3cf032eb176c20bf3fd5ac847a73b19c00.zip
Reflection toolboxes now respect settings that ...
Reflection toolboxes now respect settings that are provided to them. Before the fix CompilerCommand lacked the (args, settings, errorFn) ctor. I added it and provided means to augment passed settings with custom errorFn. Closes SI-5239. Review by odersky.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Settings.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Settings.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala
index ca99ddf27a..d57d5546fa 100644
--- a/src/compiler/scala/tools/nsc/Settings.scala
+++ b/src/compiler/scala/tools/nsc/Settings.scala
@@ -11,4 +11,10 @@ import settings.MutableSettings
*/
class Settings(errorFn: String => Unit) extends MutableSettings(errorFn) {
def this() = this(Console.println)
+
+ override def withErrorFn(errorFn: String => Unit): Settings = {
+ val settings = new Settings(errorFn)
+ copyInto(settings)
+ settings
+ }
}