diff options
Diffstat (limited to 'src/dotty/tools/dotc/Driver.scala')
-rw-r--r-- | src/dotty/tools/dotc/Driver.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/Driver.scala b/src/dotty/tools/dotc/Driver.scala index 24effb59d..3b382da58 100644 --- a/src/dotty/tools/dotc/Driver.scala +++ b/src/dotty/tools/dotc/Driver.scala @@ -44,8 +44,14 @@ abstract class Driver extends DotClass { doCompile(newCompiler(), fileNames)(ctx) } + // We overload `process` instead of using a default argument so that we + // can easily call this method using reflection from `RawCompiler` in sbt. + def process(args: Array[String]): Reporter = { + process(args, initCtx) + } + def main(args: Array[String]): Unit = - sys.exit(if (process(args, initCtx).hasErrors) 1 else 0) + sys.exit(if (process(args).hasErrors) 1 else 0) } class FatalError(msg: String) extends Exception |