Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cb0523d

Browse files
committedMar 14, 2018
fixes for 2.13 compatibility
as discovered by the Scala 2.13 community build
1 parent e7f8948 commit cb0523d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/test/scala/scala/async/run/futures/FutureSpec.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ class FutureSpec {
6161
}
6262

6363
f2 foreach { _ => throw new ThrowableTest("dispatcher foreach") }
64-
f2 onSuccess { case _ => throw new ThrowableTest("dispatcher receive") }
64+
f2 onComplete { case Success(_) => throw new ThrowableTest("dispatcher receive") }
6565

6666
latch.open()
6767

6868
Await.result(f2, defaultTimeout) mustBe ("success")
6969

7070
f2 foreach { _ => throw new ThrowableTest("current thread foreach") }
71-
f2 onSuccess { case _ => throw new ThrowableTest("current thread receive") }
71+
f2 onComplete { case Success(_) => throw new ThrowableTest("current thread receive") }
7272

7373
Await.result(f3, defaultTimeout) mustBe ("SUCCESS")
7474

@@ -251,7 +251,7 @@ class FutureSpec {
251251
val result = Future.find[Int](futures)(_ == 3)
252252
Await.result(result, defaultTimeout) mustBe (Some(3))
253253

254-
val notFound = Future.find[Int](futures.iterator)(_ == 11)
254+
val notFound = Future.find[Int](futures)(_ == 11)
255255
Await.result(notFound, defaultTimeout) mustBe (None)
256256
}
257257

0 commit comments

Comments
 (0)
Please sign in to comment.