summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/ant
diff options
context:
space:
mode:
authorStuart Golodetz <stuart@semmle.com>2012-09-13 22:10:38 +0000
committerStuart Golodetz <stuart@semmle.com>2012-09-13 22:10:38 +0000
commitaa90f538dbab5036867b80f22490c1841006fa08 (patch)
tree4497feabdb2be933ab3fbb5768e1773486256cbf /src/compiler/scala/tools/ant
parent930c85d6c96507d798d1847ea078eebf93dc0acb (diff)
downloadscala-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.
Diffstat (limited to 'src/compiler/scala/tools/ant')
-rw-r--r--src/compiler/scala/tools/ant/Scalac.scala6
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 **