File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ object Bench extends Driver {
4646 else (args(pos + 1 ).toInt, (args take pos) ++ (args drop (pos + 2 )))
4747 }
4848
49- override def process (args : Array [String ]): Reporter = {
49+ override def process (args : Array [String ], rootCtx : Context ): Reporter = {
5050 val (numCompilers, args1) = extractNumArg(args, " #compilers" )
5151 val (numRuns, args2) = extractNumArg(args1, " #runs" )
5252 this .numRuns = numRuns
53- ntimes(numCompilers)(super .process(args2))
53+ ntimes(numCompilers)(super .process(args2, rootCtx ))
5454 }
5555}
5656
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ abstract class Driver extends DotClass {
2222
2323 protected def initCtx = (new ContextBase ).initialCtx
2424
25- def process (args : Array [String ]): Reporter = {
26- val summary = CompilerCommand .distill(args)(initCtx )
25+ def process (args : Array [String ], rootCtx : Context ): Reporter = {
26+ val summary = CompilerCommand .distill(args)(rootCtx )
2727 implicit val ctx : Context = initCtx.fresh.setSettings(summary.sstate)
2828 val fileNames = CompilerCommand .checkUsage(summary)
2929 try {
@@ -41,7 +41,7 @@ abstract class Driver extends DotClass {
4141 }
4242
4343 def main (args : Array [String ]): Unit =
44- sys.exit(if (process(args).hasErrors) 1 else 0 )
44+ sys.exit(if (process(args, initCtx ).hasErrors) 1 else 0 )
4545}
4646
4747class FatalError (msg : String ) extends Exception
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class CompilerTest extends DottyTest {
1313 def compileArgs (args : Array [String ], xerrors : Int = 0 ): Unit = {
1414 val allArgs = args ++ defaultOptions
1515 val processor = if (allArgs.exists(_.startsWith(" #" ))) Bench else Main
16- val nerrors = processor.process(allArgs).count(Reporter .ERROR .level)
16+ val nerrors = processor.process(allArgs, ctx ).count(Reporter .ERROR .level)
1717 assert(nerrors == xerrors, s " Wrong # of errors. Expected: $xerrors, found: $nerrors" )
1818 }
1919
You can’t perform that action at this time.
0 commit comments