aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/scala/async/run/match0/Match0.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/scala/async/run/match0/Match0.scala')
-rw-r--r--src/test/scala/scala/async/run/match0/Match0.scala35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/test/scala/scala/async/run/match0/Match0.scala b/src/test/scala/scala/async/run/match0/Match0.scala
index 79a4e35..7624838 100644
--- a/src/test/scala/scala/async/run/match0/Match0.scala
+++ b/src/test/scala/scala/async/run/match0/Match0.scala
@@ -83,24 +83,23 @@ class MatchSpec {
result mustBe (2)
}
-// TODO 2.10.1
-// @Test def `support await referring to pattern matching vals`() {
-// import AsyncId.{async, await}
-// val result = async {
-// val x = 1
-// val opt = Some("")
-// await(0)
-// val o @ Some(y) = opt
-//
-// {
-// val o @ Some(y) = Some(".")
-// }
-//
-// await(0)
-// await((o, y.isEmpty))
-// }
-// result mustBe ((Some(""), true))
-// }
+ @Test def `support await referring to pattern matching vals`() {
+ import AsyncId.{async, await}
+ val result = async {
+ val x = 1
+ val opt = Some("")
+ await(0)
+ val o @ Some(y) = opt
+
+ {
+ val o @ Some(y) = Some(".")
+ }
+
+ await(0)
+ await((o, y.isEmpty))
+ }
+ result mustBe ((Some(""), true))
+ }
@Test def `await in scrutinee`() {
import AsyncId.{async, await}