summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2013-11-08 15:59:04 +0100
committerPhilipp Haller <hallerp@gmail.com>2013-11-12 20:15:49 +0100
commitaac015a84c2d64ce485078a5a854bc7533e2fc7b (patch)
treea892f2af1bd0c67490dcb6bfdb92d2c46e976749 /test/files/run
parent7ecfce1fb8d39275f082aaa3ad4dc0eee197391c (diff)
downloadscala-aac015a84c2d64ce485078a5a854bc7533e2fc7b.tar.gz
scala-aac015a84c2d64ce485078a5a854bc7533e2fc7b.tar.bz2
scala-aac015a84c2d64ce485078a5a854bc7533e2fc7b.zip
SI-7958 Deprecate methods `future` and `promise` in the `scala.concurrent` package object
- The corresponding `apply` methods in the `Future` and `Promise` objects should be used instead. - Adjusted tests to use non-deprecated versions - Fixed doc comments not to use deprecated methods - Added comment about planned removal in 2.13.0
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/macro-duplicate/Impls_Macros_1.scala2
-rw-r--r--test/files/run/t6448.scala2
-rw-r--r--test/files/run/t7775.scala4
-rw-r--r--test/files/run/t7805-repl-i.scala2
4 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/macro-duplicate/Impls_Macros_1.scala b/test/files/run/macro-duplicate/Impls_Macros_1.scala
index 85a581585f..7791df8fa4 100644
--- a/test/files/run/macro-duplicate/Impls_Macros_1.scala
+++ b/test/files/run/macro-duplicate/Impls_Macros_1.scala
@@ -10,7 +10,7 @@ object Macros {
case Template(_, _, ctor :: defs) =>
val defs1 = defs collect {
case ddef @ DefDef(mods, name, tparams, vparamss, tpt, body) =>
- val future = Select(Select(Select(Ident(TermName("scala")), TermName("concurrent")), TermName("package")), TermName("future"))
+ val future = Select(Select(Ident(TermName("scala")), TermName("concurrent")), TermName("Future"))
val Future = Select(Select(Ident(TermName("scala")), TermName("concurrent")), TypeName("Future"))
val tpt1 = if (tpt.isEmpty) tpt else AppliedTypeTree(Future, List(tpt))
val body1 = Apply(future, List(body))
diff --git a/test/files/run/t6448.scala b/test/files/run/t6448.scala
index 4d1528e500..d0faaa9560 100644
--- a/test/files/run/t6448.scala
+++ b/test/files/run/t6448.scala
@@ -50,7 +50,7 @@ object Test {
import concurrent.ExecutionContext.Implicits.global
import concurrent.Await
import concurrent.duration.Duration
- val result = concurrent.future(1) collect { case x if f(x) => x}
+ val result = concurrent.Future(1) collect { case x if f(x) => x}
Await.result(result, Duration.Inf)
}
diff --git a/test/files/run/t7775.scala b/test/files/run/t7775.scala
index 5fb0327611..48b0d89974 100644
--- a/test/files/run/t7775.scala
+++ b/test/files/run/t7775.scala
@@ -1,4 +1,4 @@
-import scala.concurrent.{duration, future, Await, ExecutionContext}
+import scala.concurrent.{duration, Future, Await, ExecutionContext}
import scala.tools.nsc.Settings
import ExecutionContext.Implicits.global
@@ -8,7 +8,7 @@ import ExecutionContext.Implicits.global
object Test {
def main(args: Array[String]) {
val tries = 1000 // YMMV
- val compiler = future {
+ val compiler = Future {
for(_ <- 1 to tries) new Settings(_ => {})
}
for(i <- 1 to tries * 10) System.setProperty(s"foo$i", i.toString)
diff --git a/test/files/run/t7805-repl-i.scala b/test/files/run/t7805-repl-i.scala
index bb5203951e..208cb5da13 100644
--- a/test/files/run/t7805-repl-i.scala
+++ b/test/files/run/t7805-repl-i.scala
@@ -35,7 +35,7 @@ trait HangingRepl extends ReplTest {
import ExecutionContext.Implicits._
import Resulting._
def timeout = 120 seconds
- def hanging[A](a: =>A): A = future(a) resultWithin timeout
+ def hanging[A](a: =>A): A = Future(a) resultWithin timeout
override def show() = Try(hanging(super.show())) recover {
case e => e.printStackTrace()
}