diff --git a/keywords-Await/src/test/scala/com/thoughtworks/dsl/keywords/AwaitTest.scala b/keywords-Await/src/test/scala/com/thoughtworks/dsl/keywords/AwaitTest.scala index 691cc9527..53bed1c24 100644 --- a/keywords-Await/src/test/scala/com/thoughtworks/dsl/keywords/AwaitTest.scala +++ b/keywords-Await/src/test/scala/com/thoughtworks/dsl/keywords/AwaitTest.scala @@ -15,6 +15,18 @@ import scala.language.dynamics import org.hamcrest.CoreMatchers.instanceOf class AwaitTest { + + @Test + def testReturnIf: Unit = { + val reified = reify { + if (true) { + !Return(!Await(Future(42))) + } + -1 + } + assertEquals(42, result(reified.to[Future], Duration.Inf)) + } + type Id[A] = A @Test