From 56e6726c0cabb075b2135ef1a71054aaf7ea6fd0 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 28 May 2014 18:04:29 -0700 Subject: SI-8503 -version is info setting And the Scala runner exits with 0 for info settings. Producing the version string is consolidated. The compiler driver uses the default settings hook to short-circuit on -version. That's to avoid creating the compiler; really it should check shouldStopWithInfo first, as the runner does. --- src/interactive/scala/tools/nsc/interactive/Main.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/interactive') diff --git a/src/interactive/scala/tools/nsc/interactive/Main.scala b/src/interactive/scala/tools/nsc/interactive/Main.scala index c838606f02..7796c65670 100644 --- a/src/interactive/scala/tools/nsc/interactive/Main.scala +++ b/src/interactive/scala/tools/nsc/interactive/Main.scala @@ -12,7 +12,7 @@ package interactive */ object Main extends nsc.MainClass { override def processSettingsHook(): Boolean = { - if (this.settings.Yidedebug) { + def run(): Unit = { this.settings.Xprintpos.value = true this.settings.Yrangepos.value = true val compiler = new interactive.Global(this.settings, this.reporter) @@ -27,8 +27,9 @@ object Main extends nsc.MainClass { case None => reporter.reset() // Causes other compiler errors to be ignored } askShutdown - false } - else true + super.processSettingsHook() && ( + if (this.settings.Yidedebug) { run() ; false } else true + ) } } -- cgit v1.2.3