diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-07 03:15:49 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-07 09:31:13 -0500 |
commit | 4c561daeecf9eb23e1048160d70a2d2d64f47164 (patch) | |
tree | 41983813b478681f4f0aecac8e9508f8f1d77267 | |
parent | 739885e3276e82fb2f4ff26d9ba55d3936c0b6cf (diff) | |
download | cbt-4c561daeecf9eb23e1048160d70a2d2d64f47164.tar.gz cbt-4c561daeecf9eb23e1048160d70a2d2d64f47164.tar.bz2 cbt-4c561daeecf9eb23e1048160d70a2d2d64f47164.zip |
fix deprecation warnings in Eval under Scala 2.11.8
-rw-r--r-- | libraries/eval/Eval.scala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libraries/eval/Eval.scala b/libraries/eval/Eval.scala index ff87651..6a58491 100644 --- a/libraries/eval/Eval.scala +++ b/libraries/eval/Eval.scala @@ -24,8 +24,7 @@ import java.util.Random import java.util.jar.JarFile import scala.collection.mutable import scala.io.Source -import scala.reflect.internal.util.{BatchSourceFile, Position} -import scala.tools.nsc.interpreter.AbstractFileClassLoader +import scala.reflect.internal.util.{BatchSourceFile, Position, AbstractFileClassLoader} import scala.tools.nsc.io.{AbstractFile, VirtualDirectory} import scala.tools.nsc.reporters.{Reporter, AbstractReporter} import scala.tools.nsc.{Global, Settings} @@ -35,8 +34,7 @@ import scala.util.matching.Regex /** * Evaluate a file or string and return the result. */ -@deprecated("use a throw-away instance of Eval instead", "1.8.1") -object Eval extends Eval { +object Eval { private val jvmId = java.lang.Math.abs(new Random().nextInt()) val classCleaner: Regex = "\\W".r } @@ -506,7 +504,7 @@ class Eval(target: Option[File]) { } messages += (severityName + lineMessage + ": " + message) :: (if (pos.isDefined) { - pos.inUltimateSource(pos.source).lineContent.stripLineEnd :: + pos.finalPosition.lineContent.stripLineEnd :: (" " * (pos.column - 1) + "^") :: Nil } else { |