From 4e987a3cf032eb176c20bf3fd5ac847a73b19c00 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 28 Nov 2011 13:37:52 +0000 Subject: 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. --- src/compiler/scala/tools/nsc/CompilerCommand.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/scala/tools/nsc/CompilerCommand.scala') diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala index 63cb62ee2e..54bc218912 100644 --- a/src/compiler/scala/tools/nsc/CompilerCommand.scala +++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala @@ -11,6 +11,8 @@ import io.File /** A class representing command line info for scalac */ class CompilerCommand(arguments: List[String], val settings: Settings) { def this(arguments: List[String], error: String => Unit) = this(arguments, new Settings(error)) + def this(arguments: List[String], settings: Settings, error: String => Unit) = this(arguments, settings withErrorFn error) + type Setting = Settings#Setting /** file extensions of files that the compiler can process */ -- cgit v1.2.3