diff options
author | Philipp Haller <hallerp@gmail.com> | 2009-05-27 22:58:02 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2009-05-27 22:58:02 +0000 |
commit | e8e1e61177069cdb89e89b3a41459ae19e84e914 (patch) | |
tree | 3506a8ec3921e1a0e5aac95a45bf8db1f642868b /test/files/jvm/terminateLinked.scala | |
parent | 359d4609491a10543c08f2e65db0ec0f05b52705 (diff) | |
download | scala-e8e1e61177069cdb89e89b3a41459ae19e84e914.tar.gz scala-e8e1e61177069cdb89e89b3a41459ae19e84e914.tar.bz2 scala-e8e1e61177069cdb89e89b3a41459ae19e84e914.zip |
Added test for #2000.
Diffstat (limited to 'test/files/jvm/terminateLinked.scala')
-rw-r--r-- | test/files/jvm/terminateLinked.scala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/jvm/terminateLinked.scala b/test/files/jvm/terminateLinked.scala new file mode 100644 index 0000000000..2a3b7fb49e --- /dev/null +++ b/test/files/jvm/terminateLinked.scala @@ -0,0 +1,24 @@ +import scala.actors.Actor +import Actor._ + +object Test { + def main(args: Array[String]) { + val a = actor { + for (_ <- 1 to 10) + receive { + case b: Actor => link(b) + } + throw new Exception + } + + for (_ <- 1 to 10) + actor { + a ! self + react { + case _ => + } + } + + println("Done") + } +} |