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 {
46
46
else (args(pos + 1 ).toInt, (args take pos) ++ (args drop (pos + 2 )))
47
47
}
48
48
49
- override def process (args : Array [String ]): Reporter = {
49
+ override def process (args : Array [String ], rootCtx : Context ): Reporter = {
50
50
val (numCompilers, args1) = extractNumArg(args, " #compilers" )
51
51
val (numRuns, args2) = extractNumArg(args1, " #runs" )
52
52
this .numRuns = numRuns
53
- ntimes(numCompilers)(super .process(args2))
53
+ ntimes(numCompilers)(super .process(args2, rootCtx ))
54
54
}
55
55
}
56
56
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ abstract class Driver extends DotClass {
22
22
23
23
protected def initCtx = (new ContextBase ).initialCtx
24
24
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 )
27
27
implicit val ctx : Context = initCtx.fresh.setSettings(summary.sstate)
28
28
val fileNames = CompilerCommand .checkUsage(summary)
29
29
try {
@@ -41,7 +41,7 @@ abstract class Driver extends DotClass {
41
41
}
42
42
43
43
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 )
45
45
}
46
46
47
47
class FatalError (msg : String ) extends Exception
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class CompilerTest extends DottyTest {
13
13
def compileArgs (args : Array [String ], xerrors : Int = 0 ): Unit = {
14
14
val allArgs = args ++ defaultOptions
15
15
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)
17
17
assert(nerrors == xerrors, s " Wrong # of errors. Expected: $xerrors, found: $nerrors" )
18
18
}
19
19
You can’t perform that action at this time.
0 commit comments