diff options
author | Stuart Golodetz <stuart@semmle.com> | 2012-09-13 22:10:38 +0000 |
---|---|---|
committer | Stuart Golodetz <stuart@semmle.com> | 2012-09-13 22:10:38 +0000 |
commit | aa90f538dbab5036867b80f22490c1841006fa08 (patch) | |
tree | 4497feabdb2be933ab3fbb5768e1773486256cbf | |
parent | 930c85d6c96507d798d1847ea078eebf93dc0acb (diff) | |
download | scala-aa90f538dbab5036867b80f22490c1841006fa08.tar.gz scala-aa90f538dbab5036867b80f22490c1841006fa08.tar.bz2 scala-aa90f538dbab5036867b80f22490c1841006fa08.zip |
Make the scalac Ant task recognise -Yrangepos
The scalac Ant task was not setting up the Scala compiler to produce
range positions when specifying the -Yrangepos flag in its addparams
property.
-rw-r--r-- | src/compiler/scala/tools/ant/Scalac.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/Scalac.scala b/src/compiler/scala/tools/ant/Scalac.scala index c6809fb48e..bcb7d494b6 100644 --- a/src/compiler/scala/tools/ant/Scalac.scala +++ b/src/compiler/scala/tools/ant/Scalac.scala @@ -19,6 +19,7 @@ import org.apache.tools.ant.util.facade.{FacadeTaskHelper, ImplementationSpecificArgument} import scala.tools.nsc.{Global, Settings, CompilerCommand} +import scala.tools.nsc.interactive.RangePositions import scala.tools.nsc.io.{Path => SPath} import scala.tools.nsc.reporters.{Reporter, ConsoleReporter} @@ -518,7 +519,10 @@ class Scalac extends ScalaMatchingTask with ScalacShared { new Settings(error) protected def newGlobal(settings: Settings, reporter: Reporter) = - new Global(settings, reporter) + if (settings.Yrangepos.value) + new Global(settings, reporter) with RangePositions + else + new Global(settings, reporter) /*============================================================================*\ ** The big execute method ** |