diff options
Diffstat (limited to 'test/files/jvm/t8689.scala')
-rw-r--r-- | test/files/jvm/t8689.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/jvm/t8689.scala b/test/files/jvm/t8689.scala new file mode 100644 index 0000000000..ef43a1df63 --- /dev/null +++ b/test/files/jvm/t8689.scala @@ -0,0 +1,13 @@ +object Test { + def main(args: Array[String]): Unit = { + import scala.concurrent._ + import ExecutionContext.Implicits.global + val source1 = Promise[Int]() + val source2 = Promise[Int]() + source2.completeWith(source1.future).future.onComplete { + case _ => print("success") + } + source2.tryFailure(new TimeoutException) + source1.success(123) + } +}
\ No newline at end of file |