diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/jvm/future-spec/FutureTests.scala | 46 | ||||
-rw-r--r-- | test/files/jvm/scala-concurrent-tck.scala | 116 | ||||
-rw-r--r-- | test/files/neg/logImplicits.check | 4 | ||||
-rwxr-xr-x | test/files/pos/t2484.scala | 2 | ||||
-rw-r--r-- | test/files/presentation/callcc-interpreter.check | 6 | ||||
-rw-r--r-- | test/files/presentation/ide-bug-1000349.check | 6 | ||||
-rw-r--r-- | test/files/presentation/ide-bug-1000475.check | 18 | ||||
-rw-r--r-- | test/files/presentation/ide-bug-1000531.check | 6 | ||||
-rw-r--r-- | test/files/presentation/implicit-member.check | 6 | ||||
-rw-r--r-- | test/files/presentation/ping-pong.check | 12 | ||||
-rw-r--r-- | test/files/presentation/t5708.check | 6 | ||||
-rw-r--r-- | test/files/presentation/visibility.check | 30 | ||||
-rw-r--r-- | test/files/run/macro-duplicate/Impls_Macros_1.scala | 2 | ||||
-rw-r--r-- | test/files/run/t6448.scala | 2 | ||||
-rw-r--r-- | test/files/run/t7775.scala | 4 | ||||
-rw-r--r-- | test/files/run/t7805-repl-i.scala | 2 |
16 files changed, 104 insertions, 164 deletions
diff --git a/test/files/jvm/future-spec/FutureTests.scala b/test/files/jvm/future-spec/FutureTests.scala index 1595b2c862..cfdcc31ac5 100644 --- a/test/files/jvm/future-spec/FutureTests.scala +++ b/test/files/jvm/future-spec/FutureTests.scala @@ -15,7 +15,7 @@ class FutureTests extends MinimalScalaTest { /* some utils */ def testAsync(s: String)(implicit ec: ExecutionContext): Future[String] = s match { - case "Hello" => future { "World" } + case "Hello" => Future { "World" } case "Failure" => Future.failed(new RuntimeException("Expected exception; to test fault-tolerance")) case "NoReply" => Promise[String]().future } @@ -34,7 +34,7 @@ class FutureTests extends MinimalScalaTest { class ThrowableTest(m: String) extends Throwable(m) - val f1 = future[Any] { + val f1 = Future[Any] { throw new ThrowableTest("test") } @@ -43,7 +43,7 @@ class FutureTests extends MinimalScalaTest { } val latch = new TestLatch - val f2 = future { + val f2 = Future { Await.ready(latch, 5 seconds) "success" } @@ -61,7 +61,7 @@ class FutureTests extends MinimalScalaTest { Await.result(f3, defaultTimeout) mustBe ("SUCCESS") - val waiting = future { + val waiting = Future { Thread.sleep(1000) } Await.ready(waiting, 2000 millis) @@ -106,8 +106,8 @@ class FutureTests extends MinimalScalaTest { import ExecutionContext.Implicits._ "compose with for-comprehensions" in { - def async(x: Int) = future { (x * 2).toString } - val future0 = future[Any] { + def async(x: Int) = Future { (x * 2).toString } + val future0 = Future[Any] { "five!".length } @@ -119,8 +119,8 @@ class FutureTests extends MinimalScalaTest { val future2 = for { a <- future0.mapTo[Int] - b <- (future { (a * 2).toString }).mapTo[Int] - c <- future { (7 * 2).toString } + b <- (Future { (a * 2).toString }).mapTo[Int] + c <- Future { (7 * 2).toString } } yield b + "-" + c Await.result(future1, defaultTimeout) mustBe ("10-14") @@ -132,8 +132,8 @@ class FutureTests extends MinimalScalaTest { case class Req[T](req: T) case class Res[T](res: T) def async[T](req: Req[T]) = req match { - case Req(s: String) => future { Res(s.length) } - case Req(i: Int) => future { Res((i * 2).toString) } + case Req(s: String) => Future { Res(s.length) } + case Req(i: Int) => Future { Res((i * 2).toString) } } val future1 = for { @@ -224,7 +224,7 @@ class FutureTests extends MinimalScalaTest { "andThen like a boss" in { val q = new java.util.concurrent.LinkedBlockingQueue[Int] for (i <- 1 to 1000) { - val chained = future { + val chained = Future { q.add(1); 3 } andThen { case _ => q.add(2) @@ -251,7 +251,7 @@ class FutureTests extends MinimalScalaTest { } "find" in { - val futures = for (i <- 1 to 10) yield future { + val futures = for (i <- 1 to 10) yield Future { i } @@ -286,7 +286,7 @@ class FutureTests extends MinimalScalaTest { "fold" in { val timeout = 10000 millis - def async(add: Int, wait: Int) = future { + def async(add: Int, wait: Int) = Future { Thread.sleep(wait) add } @@ -306,7 +306,7 @@ class FutureTests extends MinimalScalaTest { "fold by composing" in { val timeout = 10000 millis - def async(add: Int, wait: Int) = future { + def async(add: Int, wait: Int) = Future { Thread.sleep(wait) add } @@ -321,7 +321,7 @@ class FutureTests extends MinimalScalaTest { "fold with an exception" in { val timeout = 10000 millis - def async(add: Int, wait: Int) = future { + def async(add: Int, wait: Int) = Future { Thread.sleep(wait) if (add == 6) throw new IllegalArgumentException("shouldFoldResultsWithException: expected") add @@ -357,7 +357,7 @@ class FutureTests extends MinimalScalaTest { } "shouldReduceResults" in { - def async(idx: Int) = future { + def async(idx: Int) = Future { Thread.sleep(idx * 20) idx } @@ -373,7 +373,7 @@ class FutureTests extends MinimalScalaTest { } "shouldReduceResultsWithException" in { - def async(add: Int, wait: Int) = future { + def async(add: Int, wait: Int) = Future { Thread.sleep(wait) if (add == 6) throw new IllegalArgumentException("shouldFoldResultsWithException: expected") else add @@ -404,7 +404,7 @@ class FutureTests extends MinimalScalaTest { } } - val oddFutures = List.fill(100)(future { counter.incAndGet() }).iterator + val oddFutures = List.fill(100)(Future { counter.incAndGet() }).iterator val traversed = Future.sequence(oddFutures) Await.result(traversed, defaultTimeout).sum mustBe (10000) @@ -420,11 +420,11 @@ class FutureTests extends MinimalScalaTest { "shouldBlockUntilResult" in { val latch = new TestLatch - val f = future { + val f = Future { Await.ready(latch, 5 seconds) 5 } - val f2 = future { + val f2 = Future { val res = Await.result(f, Inf) res + 9 } @@ -437,7 +437,7 @@ class FutureTests extends MinimalScalaTest { Await.result(f2, defaultTimeout) mustBe (14) - val f3 = future { + val f3 = Future { Thread.sleep(100) 5 } @@ -450,7 +450,7 @@ class FutureTests extends MinimalScalaTest { "run callbacks async" in { val latch = Vector.fill(10)(new TestLatch) - val f1 = future { + val f1 = Future { latch(0).open() Await.ready(latch(1), TestLatch.DefaultTimeout) "Hello" @@ -542,7 +542,7 @@ class FutureTests extends MinimalScalaTest { "should not throw when Await.ready" in { val expected = try Success(5 / 0) catch { case a: ArithmeticException => Failure(a) } - val f = future(5).map(_ / 0) + val f = Future(5).map(_ / 0) Await.ready(f, defaultTimeout).value.get.toString mustBe expected.toString } diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala index 5006793084..b431f6b8f8 100644 --- a/test/files/jvm/scala-concurrent-tck.scala +++ b/test/files/jvm/scala-concurrent-tck.scala @@ -8,7 +8,7 @@ import scala.concurrent.{ CanAwait, Await } -import scala.concurrent.{ future, promise, blocking } +import scala.concurrent.blocking import scala.util.{ Try, Success, Failure } import scala.concurrent.duration.Duration import scala.reflect.{ classTag, ClassTag } @@ -35,14 +35,14 @@ trait FutureCallbacks extends TestBase { def testOnSuccess(): Unit = once { done => var x = 0 - val f = future { x = 1 } + val f = Future { x = 1 } f onSuccess { case _ => done(x == 1) } } def testOnSuccessWhenCompleted(): Unit = once { done => var x = 0 - val f = future { x = 1 } + val f = Future { x = 1 } f onSuccess { case _ if x == 1 => x = 2 @@ -52,21 +52,21 @@ trait FutureCallbacks extends TestBase { def testOnSuccessWhenFailed(): Unit = once { done => - val f = future[Unit] { throw new Exception } + val f = Future[Unit] { throw new Exception } f onSuccess { case _ => done(false) } f onFailure { case _ => done(true) } } def testOnFailure(): Unit = once { done => - val f = future[Unit] { throw new Exception } + val f = Future[Unit] { throw new Exception } f onSuccess { case _ => done(false) } f onFailure { case _ => done(true) } } def testOnFailureWhenSpecialThrowable(num: Int, cause: Throwable): Unit = once { done => - val f = future[Unit] { throw cause } + val f = Future[Unit] { throw cause } f onSuccess { case _ => done(false) } f onFailure { case e: ExecutionException if e.getCause == cause => done(true) @@ -76,7 +76,7 @@ trait FutureCallbacks extends TestBase { def testOnFailureWhenTimeoutException(): Unit = once { done => - val f = future[Unit] { throw new TimeoutException() } + val f = Future[Unit] { throw new TimeoutException() } f onSuccess { case _ => done(false) } f onFailure { case e: TimeoutException => done(true) @@ -108,7 +108,7 @@ trait FutureCombinators extends TestBase { def testMapSuccess(): Unit = once { done => - val f = future { 5 } + val f = Future { 5 } val g = f map { x => "result: " + x } g onSuccess { case s => done(s == "result: 5") } g onFailure { case _ => done(false) } @@ -116,7 +116,7 @@ trait FutureCombinators extends TestBase { def testMapFailure(): Unit = once { done => - val f = future[Unit] { throw new Exception("exception message") } + val f = Future[Unit] { throw new Exception("exception message") } val g = f map { x => "result: " + x } g onSuccess { case _ => done(false) } g onFailure { case t => done(t.getMessage() == "exception message") } @@ -124,7 +124,7 @@ trait FutureCombinators extends TestBase { def testMapSuccessPF(): Unit = once { done => - val f = future { 5 } + val f = Future { 5 } val g = f map { case r => "result: " + r } g onSuccess { case s => done(s == "result: 5") } g onFailure { case _ => done(false) } @@ -132,7 +132,7 @@ trait FutureCombinators extends TestBase { def testTransformSuccess(): Unit = once { done => - val f = future { 5 } + val f = Future { 5 } val g = f.transform(r => "result: " + r, identity) g onSuccess { case s => done(s == "result: 5") } g onFailure { case _ => done(false) } @@ -140,7 +140,7 @@ trait FutureCombinators extends TestBase { def testTransformSuccessPF(): Unit = once { done => - val f = future { 5 } + val f = Future { 5 } val g = f.transform( { case r => "result: " + r }, identity) g onSuccess { case s => done(s == "result: 5") } g onFailure { case _ => done(false) } @@ -149,7 +149,7 @@ trait FutureCombinators extends TestBase { def testTransformFailure(): Unit = once { done => val transformed = new Exception("transformed") - val f = future { throw new Exception("expected") } + val f = Future { throw new Exception("expected") } val g = f.transform(identity, _ => transformed) g onSuccess { case _ => done(false) } g onFailure { case e => done(e eq transformed) } @@ -159,7 +159,7 @@ def testTransformFailure(): Unit = once { done => val e = new Exception("expected") val transformed = new Exception("transformed") - val f = future[Unit] { throw e } + val f = Future[Unit] { throw e } val g = f.transform(identity, { case `e` => transformed }) g onSuccess { case _ => done(false) } g onFailure { case e => done(e eq transformed) } @@ -167,7 +167,7 @@ def testTransformFailure(): Unit = once { def testFoldFailure(): Unit = once { done => - val f = future[Unit] { throw new Exception("expected") } + val f = Future[Unit] { throw new Exception("expected") } val g = f.transform(r => "result: " + r, identity) g onSuccess { case _ => done(false) } g onFailure { case t => done(t.getMessage() == "expected") } @@ -175,23 +175,23 @@ def testTransformFailure(): Unit = once { def testFlatMapSuccess(): Unit = once { done => - val f = future { 5 } - val g = f flatMap { _ => future { 10 } } + val f = Future { 5 } + val g = f flatMap { _ => Future { 10 } } g onSuccess { case x => done(x == 10) } g onFailure { case _ => done(false) } } def testFlatMapFailure(): Unit = once { done => - val f = future[Unit] { throw new Exception("expected") } - val g = f flatMap { _ => future { 10 } } + val f = Future[Unit] { throw new Exception("expected") } + val g = f flatMap { _ => Future { 10 } } g onSuccess { case _ => done(false) } g onFailure { case t => done(t.getMessage() == "expected") } } def testFilterSuccess(): Unit = once { done => - val f = future { 4 } + val f = Future { 4 } val g = f filter { _ % 2 == 0 } g onSuccess { case x: Int => done(x == 4) } g onFailure { case _ => done(false) } @@ -199,7 +199,7 @@ def testTransformFailure(): Unit = once { def testFilterFailure(): Unit = once { done => - val f = future { 4 } + val f = Future { 4 } val g = f filter { _ % 2 == 1 } g onSuccess { case x: Int => done(false) } g onFailure { @@ -210,7 +210,7 @@ def testTransformFailure(): Unit = once { def testCollectSuccess(): Unit = once { done => - val f = future { -5 } + val f = Future { -5 } val g = f collect { case x if x < 0 => -x } g onSuccess { case x: Int => done(x == 5) } g onFailure { case _ => done(false) } @@ -218,7 +218,7 @@ def testTransformFailure(): Unit = once { def testCollectFailure(): Unit = once { done => - val f = future { -5 } + val f = Future { -5 } val g = f collect { case x if x > 0 => x * 2 } g onSuccess { case _ => done(false) } g onFailure { @@ -232,8 +232,8 @@ def testTransformFailure(): Unit = once { def testForeachSuccess(): Unit = once { done => - val p = promise[Int]() - val f = future[Int] { 5 } + val p = Promise[Int]() + val f = Future[Int] { 5 } f foreach { x => p.success(x * 2) } val g = p.future @@ -243,8 +243,8 @@ def testTransformFailure(): Unit = once { def testForeachFailure(): Unit = once { done => - val p = promise[Int]() - val f = future[Int] { throw new Exception } + val p = Promise[Int]() + val f = Future[Int] { throw new Exception } f foreach { x => p.success(x * 2) } f onFailure { case _ => p.failure(new Exception) } val g = p.future @@ -256,7 +256,7 @@ def testTransformFailure(): Unit = once { def testRecoverSuccess(): Unit = once { done => val cause = new RuntimeException - val f = future { + val f = Future { throw cause } recover { case re: RuntimeException => @@ -268,7 +268,7 @@ def testTransformFailure(): Unit = once { def testRecoverFailure(): Unit = once { done => val cause = new RuntimeException - val f = future { + val f = Future { throw cause } recover { case te: TimeoutException => "timeout" @@ -280,11 +280,11 @@ def testTransformFailure(): Unit = once { def testRecoverWithSuccess(): Unit = once { done => val cause = new RuntimeException - val f = future { + val f = Future { throw cause } recoverWith { case re: RuntimeException => - future { "recovered" } + Future { "recovered" } } f onSuccess { case x => done(x == "recovered") } f onFailure { case any => done(false) } @@ -293,11 +293,11 @@ def testTransformFailure(): Unit = once { def testRecoverWithFailure(): Unit = once { done => val cause = new RuntimeException - val f = future { + val f = Future { throw cause } recoverWith { case te: TimeoutException => - future { "timeout" } + Future { "timeout" } } f onSuccess { case x => done(false) } f onFailure { case any => done(any == cause) } @@ -305,8 +305,8 @@ def testTransformFailure(): Unit = once { def testZipSuccess(): Unit = once { done => - val f = future { 5 } - val g = future { 6 } + val f = Future { 5 } + val g = Future { 6 } val h = f zip g h onSuccess { case (l: Int, r: Int) => done(l+r == 11) } h onFailure { case _ => done(false) } @@ -315,8 +315,8 @@ def testTransformFailure(): Unit = once { def testZipFailureLeft(): Unit = once { done => val cause = new Exception("expected") - val f = future { throw cause } - val g = future { 6 } + val f = Future { throw cause } + val g = Future { 6 } val h = f zip g h onSuccess { case _ => done(false) } h onFailure { case e: Exception => done(e.getMessage == "expected") } @@ -325,8 +325,8 @@ def testTransformFailure(): Unit = once { def testZipFailureRight(): Unit = once { done => val cause = new Exception("expected") - val f = future { 5 } - val g = future { throw cause } + val f = Future { 5 } + val g = Future { throw cause } val h = f zip g h onSuccess { case _ => done(false) } h onFailure { case e: Exception => done(e.getMessage == "expected") } @@ -334,8 +334,8 @@ def testTransformFailure(): Unit = once { def testFallbackTo(): Unit = once { done => - val f = future { sys.error("failed") } - val g = future { 5 } + val f = Future { sys.error("failed") } + val g = Future { 5 } val h = f fallbackTo g h onSuccess { case x: Int => done(x == 5) } h onFailure { case _ => done(false) } @@ -344,8 +344,8 @@ def testTransformFailure(): Unit = once { def testFallbackToFailure(): Unit = once { done => val cause = new Exception - val f = future { sys.error("failed") } - val g = future { throw cause } + val f = Future { sys.error("failed") } + val g = Future { throw cause } val h = f fallbackTo g h onSuccess { case _ => done(false) } @@ -382,7 +382,7 @@ trait FutureProjections extends TestBase { def testFailedFailureOnComplete(): Unit = once { done => val cause = new RuntimeException - val f = future { throw cause } + val f = Future { throw cause } f.failed onComplete { case Success(t) => done(t == cause) case Failure(t) => done(false) @@ -392,13 +392,13 @@ trait FutureProjections extends TestBase { def testFailedFailureOnSuccess(): Unit = once { done => val cause = new RuntimeException - val f = future { throw cause } + val f = Future { throw cause } f.failed onSuccess { case t => done(t == cause) } } def testFailedSuccessOnComplete(): Unit = once { done => - val f = future { 0 } + val f = Future { 0 } f.failed onComplete { case Failure(_: NoSuchElementException) => done(true) case _ => done(false) @@ -407,7 +407,7 @@ trait FutureProjections extends TestBase { def testFailedSuccessOnFailure(): Unit = once { done => - val f = future { 0 } + val f = Future { 0 } f.failed onFailure { case e: NoSuchElementException => done(true) case _ => done(false) @@ -418,13 +418,13 @@ trait FutureProjections extends TestBase { def testFailedFailureAwait(): Unit = once { done => val cause = new RuntimeException - val f = future { throw cause } + val f = Future { throw cause } done(Await.result(f.failed, Duration(500, "ms")) == cause) } def testFailedSuccessAwait(): Unit = once { done => - val f = future { 0 } + val f = Future { 0 } try { Await.result(f.failed, Duration(500, "ms")) done(false) @@ -437,7 +437,7 @@ trait FutureProjections extends TestBase { def testAwaitPositiveDuration(): Unit = once { done => val p = Promise[Int]() val f = p.future - future { + Future { intercept[IllegalArgumentException] { Await.ready(f, Duration.Undefined) } p.success(0) Await.ready(f, Duration.Zero) @@ -449,7 +449,7 @@ trait FutureProjections extends TestBase { def testAwaitNegativeDuration(): Unit = once { done => val f = Promise().future - future { + Future { intercept[TimeoutException] { Await.ready(f, Duration.Zero) } intercept[TimeoutException] { Await.ready(f, Duration.MinusInf) } intercept[TimeoutException] { Await.ready(f, Duration(-500, "ms")) } @@ -473,14 +473,14 @@ trait Blocking extends TestBase { def testAwaitSuccess(): Unit = once { done => - val f = future { 0 } + val f = Future { 0 } done(Await.result(f, Duration(500, "ms")) == 0) } def testAwaitFailure(): Unit = once { done => val cause = new RuntimeException - val f = future { throw cause } + val f = Future { throw cause } try { Await.result(f, Duration(500, "ms")) done(false) @@ -562,7 +562,7 @@ trait Promises extends TestBase { def testSuccess(): Unit = once { done => - val p = promise[Int]() + val p = Promise[Int]() val f = p.future f onSuccess { case x => done(x == 5) } @@ -574,7 +574,7 @@ trait Promises extends TestBase { def testFailure(): Unit = once { done => val e = new Exception("expected") - val p = promise[Int]() + val p = Promise[Int]() val f = p.future f onSuccess { case x => done(false) } @@ -644,7 +644,7 @@ trait CustomExecutionContext extends TestBase { val count = countExecs { implicit ec => blocking { once { done => - val f = future(assertNoEC())(defaultEC) + val f = Future(assertNoEC())(defaultEC) f onSuccess { case _ => assertEC() @@ -749,14 +749,14 @@ trait ExecutionContextPrepare extends TestBase { def testOnComplete(): Unit = once { done => theLocal.set("secret") - val fut = future { 42 } + val fut = Future { 42 } fut onComplete { case _ => done(theLocal.get == "secret") } } def testMap(): Unit = once { done => theLocal.set("secret2") - val fut = future { 42 } + val fut = Future { 42 } fut map { x => done(theLocal.get == "secret2") } } diff --git a/test/files/neg/logImplicits.check b/test/files/neg/logImplicits.check index 0522bd8354..2265614962 100644 --- a/test/files/neg/logImplicits.check +++ b/test/files/neg/logImplicits.check @@ -7,10 +7,10 @@ logImplicits.scala:7: applied implicit conversion from String("abc") to ?{def ma logImplicits.scala:15: inferred view from String("abc") to Int = C.this.convert:(p: String("abc"))Int math.max(122, x: Int) ^ -logImplicits.scala:19: applied implicit conversion from Int(1) to ?{def ->: ?} = implicit def ArrowAssoc[A](__leftOfArrow: A): ArrowAssoc[A] +logImplicits.scala:19: applied implicit conversion from Int(1) to ?{def ->: ?} = implicit def ArrowAssoc[A](self: A): ArrowAssoc[A] def f = (1 -> 2) + "c" ^ -logImplicits.scala:19: applied implicit conversion from (Int, Int) to ?{def +: ?} = implicit def StringAdd[A](__thingToAdd: A): StringAdd[A] +logImplicits.scala:19: applied implicit conversion from (Int, Int) to ?{def +: ?} = implicit def StringAdd[A](self: A): StringAdd[A] def f = (1 -> 2) + "c" ^ logImplicits.scala:22: error: class Un needs to be abstract, since method unimplemented is not defined diff --git a/test/files/pos/t2484.scala b/test/files/pos/t2484.scala index 29f798edf9..88da6aaac8 100755 --- a/test/files/pos/t2484.scala +++ b/test/files/pos/t2484.scala @@ -3,7 +3,7 @@ import concurrent.ExecutionContext.Implicits.global class Admin extends javax.swing.JApplet { val jScrollPane = new javax.swing.JScrollPane (null, 0, 0) def t2484: Unit = { - scala.concurrent.future {jScrollPane.synchronized { + scala.concurrent.Future {jScrollPane.synchronized { def someFunction () = {} //scala.concurrent.ops.spawn {someFunction ()} jScrollPane.addComponentListener (new java.awt.event.ComponentAdapter {override def componentShown (e: java.awt.event.ComponentEvent) = { diff --git a/test/files/presentation/callcc-interpreter.check b/test/files/presentation/callcc-interpreter.check index 59c841a255..d41b982614 100644 --- a/test/files/presentation/callcc-interpreter.check +++ b/test/files/presentation/callcc-interpreter.check @@ -3,7 +3,7 @@ reload: CallccInterpreter.scala askTypeCompletion at CallccInterpreter.scala(51,38) ================================================================================ [response] askCompletionAt (51,38) -retrieved 63 members +retrieved 59 members abstract trait Term extends AnyRef abstract trait Value extends AnyRef case class Add extends callccInterpreter.Term with Product with Serializable @@ -52,10 +52,6 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: callccInterpreter.type -private[this] val __resultOfEnsuring: callccInterpreter.type -private[this] val __stringToFormat: callccInterpreter.type -private[this] val __thingToAdd: callccInterpreter.type private[this] val term0: callccInterpreter.App private[this] val term1: callccInterpreter.App private[this] val term2: callccInterpreter.Add diff --git a/test/files/presentation/ide-bug-1000349.check b/test/files/presentation/ide-bug-1000349.check index b15486f4ac..aa6660cec5 100644 --- a/test/files/presentation/ide-bug-1000349.check +++ b/test/files/presentation/ide-bug-1000349.check @@ -3,7 +3,7 @@ reload: CompletionOnEmptyArgMethod.scala askTypeCompletion at CompletionOnEmptyArgMethod.scala(2,17) ================================================================================ [response] askCompletionAt (2,17) -retrieved 36 members +retrieved 32 members def +(other: String): String def ->[B](y: B): (Foo, B) def ensuring(cond: Boolean): Foo @@ -31,10 +31,6 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: Foo -private[this] val __resultOfEnsuring: Foo -private[this] val __stringToFormat: Foo -private[this] val __thingToAdd: Foo protected[package lang] def clone(): Object protected[package lang] def finalize(): Unit ================================================================================ diff --git a/test/files/presentation/ide-bug-1000475.check b/test/files/presentation/ide-bug-1000475.check index e4b8508846..cb7de6d34a 100644 --- a/test/files/presentation/ide-bug-1000475.check +++ b/test/files/presentation/ide-bug-1000475.check @@ -3,7 +3,7 @@ reload: Foo.scala askTypeCompletion at Foo.scala(3,7) ================================================================================ [response] askCompletionAt (3,7) -retrieved 35 members +retrieved 31 members [inaccessible] protected[package lang] def clone(): Object [inaccessible] protected[package lang] def finalize(): Unit def +(other: String): String @@ -32,16 +32,12 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: Object -private[this] val __resultOfEnsuring: Object -private[this] val __stringToFormat: Object -private[this] val __thingToAdd: Object ================================================================================ askTypeCompletion at Foo.scala(6,10) ================================================================================ [response] askCompletionAt (6,10) -retrieved 35 members +retrieved 31 members [inaccessible] protected[package lang] def clone(): Object [inaccessible] protected[package lang] def finalize(): Unit def +(other: String): String @@ -70,16 +66,12 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: Object -private[this] val __resultOfEnsuring: Object -private[this] val __stringToFormat: Object -private[this] val __thingToAdd: Object ================================================================================ askTypeCompletion at Foo.scala(7,7) ================================================================================ [response] askCompletionAt (7,7) -retrieved 35 members +retrieved 31 members [inaccessible] protected[package lang] def clone(): Object [inaccessible] protected[package lang] def finalize(): Unit def +(other: String): String @@ -108,8 +100,4 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: Object -private[this] val __resultOfEnsuring: Object -private[this] val __stringToFormat: Object -private[this] val __thingToAdd: Object ================================================================================ diff --git a/test/files/presentation/ide-bug-1000531.check b/test/files/presentation/ide-bug-1000531.check index be8805330a..9a2cad5fd2 100644 --- a/test/files/presentation/ide-bug-1000531.check +++ b/test/files/presentation/ide-bug-1000531.check @@ -3,7 +3,7 @@ reload: CrashOnLoad.scala askTypeCompletion at CrashOnLoad.scala(6,12) ================================================================================ [response] askCompletionAt (6,12) -retrieved 124 members +retrieved 120 members [inaccessible] protected[package lang] def clone(): Object [inaccessible] protected[package lang] def finalize(): Unit [inaccessible] protected[this] def reversed: List[B] @@ -121,8 +121,4 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: java.util.Iterator[B] -private[this] val __resultOfEnsuring: java.util.Iterator[B] -private[this] val __stringToFormat: java.util.Iterator[B] -private[this] val __thingToAdd: java.util.Iterator[B] ================================================================================ diff --git a/test/files/presentation/implicit-member.check b/test/files/presentation/implicit-member.check index acf7e1a0fd..ef361599c5 100644 --- a/test/files/presentation/implicit-member.check +++ b/test/files/presentation/implicit-member.check @@ -3,7 +3,7 @@ reload: ImplicitMember.scala askTypeCompletion at ImplicitMember.scala(7,7) ================================================================================ [response] askCompletionAt (7,7) -retrieved 38 members +retrieved 34 members def +(other: String): String def ->[B](y: B): (Implicit.type, B) def ensuring(cond: Boolean): Implicit.type @@ -32,10 +32,6 @@ final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit implicit def AppliedImplicit[A](x: A): Implicit.AppliedImplicit[A] -private[this] val __leftOfArrow: Implicit.type -private[this] val __resultOfEnsuring: Implicit.type -private[this] val __stringToFormat: Implicit.type -private[this] val __thingToAdd: Implicit.type private[this] val x: Implicit.type protected[package lang] def clone(): Object protected[package lang] def finalize(): Unit diff --git a/test/files/presentation/ping-pong.check b/test/files/presentation/ping-pong.check index be80601e11..10d29bfed6 100644 --- a/test/files/presentation/ping-pong.check +++ b/test/files/presentation/ping-pong.check @@ -3,7 +3,7 @@ reload: PingPong.scala askTypeCompletion at PingPong.scala(10,23) ================================================================================ [response] askCompletionAt (10,23) -retrieved 39 members +retrieved 35 members [inaccessible] private[this] val ping: Ping [inaccessible] protected[package lang] def clone(): Object [inaccessible] protected[package lang] def finalize(): Unit @@ -34,17 +34,13 @@ final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit override def toString(): String -private[this] val __leftOfArrow: Pong -private[this] val __resultOfEnsuring: Pong -private[this] val __stringToFormat: Pong -private[this] val __thingToAdd: Pong private[this] val name: String ================================================================================ askTypeCompletion at PingPong.scala(19,20) ================================================================================ [response] askCompletionAt (19,20) -retrieved 39 members +retrieved 35 members [inaccessible] protected[package lang] def clone(): Object [inaccessible] protected[package lang] def finalize(): Unit def +(other: String): String @@ -76,10 +72,6 @@ final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit override def toString(): String -private[this] val __leftOfArrow: Ping -private[this] val __resultOfEnsuring: Ping -private[this] val __stringToFormat: Ping -private[this] val __thingToAdd: Ping private[this] val pong: Pong ================================================================================ diff --git a/test/files/presentation/t5708.check b/test/files/presentation/t5708.check index b2cedd689f..5f17c0b762 100644 --- a/test/files/presentation/t5708.check +++ b/test/files/presentation/t5708.check @@ -3,7 +3,7 @@ reload: Completions.scala askTypeCompletion at Completions.scala(17,9) ================================================================================ [response] askCompletionAt (17,9) -retrieved 43 members +retrieved 39 members [inaccessible] private def privateM: String [inaccessible] private[this] val privateV: String [inaccessible] private[this] val protectedV: String @@ -39,9 +39,5 @@ final def wait(x$1: Long,x$2: Int): Unit final private[this] val CONST_STRING: String("constant") lazy private[this] var foo: Int private[package test] def pkgPrivateM: String -private[this] val __leftOfArrow: test.Compat.type -private[this] val __resultOfEnsuring: test.Compat.type -private[this] val __stringToFormat: test.Compat.type -private[this] val __thingToAdd: test.Compat.type private[this] val pkgPrivateV: String ================================================================================ diff --git a/test/files/presentation/visibility.check b/test/files/presentation/visibility.check index 4ba7dbaad9..078e0a2342 100644 --- a/test/files/presentation/visibility.check +++ b/test/files/presentation/visibility.check @@ -3,7 +3,7 @@ reload: Completions.scala askTypeCompletion at Completions.scala(14,12) ================================================================================ [response] askCompletionAt (14,12) -retrieved 41 members +retrieved 37 members [inaccessible] private[this] def secretPrivateThis(): Unit def +(other: String): String def ->[B](y: B): (accessibility.Foo, B) @@ -34,10 +34,6 @@ final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit private def secretPrivate(): Unit -private[this] val __leftOfArrow: accessibility.Foo -private[this] val __resultOfEnsuring: accessibility.Foo -private[this] val __stringToFormat: accessibility.Foo -private[this] val __thingToAdd: accessibility.Foo protected def secretProtected(): Unit protected[package accessibility] def secretProtectedInPackage(): Unit protected[package lang] def clone(): Object @@ -47,7 +43,7 @@ protected[package lang] def finalize(): Unit askTypeCompletion at Completions.scala(16,11) ================================================================================ [response] askCompletionAt (16,11) -retrieved 41 members +retrieved 37 members def +(other: String): String def ->[B](y: B): (accessibility.Foo, B) def ensuring(cond: Boolean): accessibility.Foo @@ -78,10 +74,6 @@ final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit private def secretPrivate(): Unit private[this] def secretPrivateThis(): Unit -private[this] val __leftOfArrow: accessibility.Foo -private[this] val __resultOfEnsuring: accessibility.Foo -private[this] val __stringToFormat: accessibility.Foo -private[this] val __thingToAdd: accessibility.Foo protected def secretProtected(): Unit protected[package accessibility] def secretProtectedInPackage(): Unit protected[package lang] def clone(): Object @@ -91,7 +83,7 @@ protected[package lang] def finalize(): Unit askTypeCompletion at Completions.scala(22,11) ================================================================================ [response] askCompletionAt (22,11) -retrieved 41 members +retrieved 37 members [inaccessible] private def secretPrivate(): Unit def +(other: String): String def ->[B](y: B): (accessibility.AccessibilityChecks, B) @@ -122,10 +114,6 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: accessibility.AccessibilityChecks -private[this] val __resultOfEnsuring: accessibility.AccessibilityChecks -private[this] val __stringToFormat: accessibility.AccessibilityChecks -private[this] val __thingToAdd: accessibility.AccessibilityChecks protected def secretProtected(): Unit protected[package accessibility] def secretProtectedInPackage(): Unit protected[package lang] def clone(): Object @@ -135,7 +123,7 @@ protected[package lang] def finalize(): Unit askTypeCompletion at Completions.scala(28,10) ================================================================================ [response] askCompletionAt (28,10) -retrieved 41 members +retrieved 37 members [inaccessible] private def secretPrivate(): Unit [inaccessible] private[this] def secretPrivateThis(): Unit [inaccessible] protected def secretProtected(): Unit @@ -169,17 +157,13 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: accessibility.Foo -private[this] val __resultOfEnsuring: accessibility.Foo -private[this] val __stringToFormat: accessibility.Foo -private[this] val __thingToAdd: accessibility.Foo protected[package accessibility] def secretProtectedInPackage(): Unit ================================================================================ askTypeCompletion at Completions.scala(37,8) ================================================================================ [response] askCompletionAt (37,8) -retrieved 41 members +retrieved 37 members [inaccessible] private def secretPrivate(): Unit [inaccessible] private[this] def secretPrivateThis(): Unit [inaccessible] protected def secretProtected(): Unit @@ -214,8 +198,4 @@ final def synchronized[T0](x$1: T0): T0 final def wait(): Unit final def wait(x$1: Long): Unit final def wait(x$1: Long,x$2: Int): Unit -private[this] val __leftOfArrow: accessibility.Foo -private[this] val __resultOfEnsuring: accessibility.Foo -private[this] val __stringToFormat: accessibility.Foo -private[this] val __thingToAdd: accessibility.Foo ================================================================================ 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() } |