summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2010-03-08 18:17:50 +0000
committerPhilipp Haller <hallerp@gmail.com>2010-03-08 18:17:50 +0000
commit5f7ddb20ab2e3729f30f6b1ee432a078a1a09899 (patch)
treecca5d4b28693bd61b403817d7565ad3419bdceaf /test/files/jvm
parentb9691e331e8ffb35f42de0bee457e2440e25bb04 (diff)
downloadscala-5f7ddb20ab2e3729f30f6b1ee432a078a1a09899.tar.gz
scala-5f7ddb20ab2e3729f30f6b1ee432a078a1a09899.tar.bz2
scala-5f7ddb20ab2e3729f30f6b1ee432a078a1a09899.zip
Closes #3102.
Diffstat (limited to 'test/files/jvm')
-rw-r--r--test/files/jvm/t3102.check2
-rw-r--r--test/files/jvm/t3102.scala26
2 files changed, 28 insertions, 0 deletions
diff --git a/test/files/jvm/t3102.check b/test/files/jvm/t3102.check
new file mode 100644
index 0000000000..d705e0b20e
--- /dev/null
+++ b/test/files/jvm/t3102.check
@@ -0,0 +1,2 @@
+42
+OK
diff --git a/test/files/jvm/t3102.scala b/test/files/jvm/t3102.scala
new file mode 100644
index 0000000000..ea3e720eca
--- /dev/null
+++ b/test/files/jvm/t3102.scala
@@ -0,0 +1,26 @@
+import scala.actors.{Actor, TIMEOUT}
+import Actor._
+
+object Test {
+ def main(args: Array[String]) {
+ val a = actor {
+ react {
+ case 'hello =>
+ reply(42)
+ }
+ }
+
+ val b = actor {
+ self.trapExit = true
+ val ft = a !! 'hello
+ println(ft())
+ // no message should be left over in mailbox
+ reactWithin(0) {
+ case TIMEOUT =>
+ println("OK")
+ case any =>
+ println(any)
+ }
+ }
+ }
+}