summaryrefslogtreecommitdiff
path: root/test/files/pos/MailBox.scala
diff options
context:
space:
mode:
authorMatthias Zenger <mzenger@gmail.com>2004-02-10 21:44:56 +0000
committerMatthias Zenger <mzenger@gmail.com>2004-02-10 21:44:56 +0000
commit2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9 (patch)
tree1c6491de87a0ddb7caa53f0636854bd30e4dc818 /test/files/pos/MailBox.scala
parent0b38cbc3c5d5f18c56a0cf9b08ac913a3f21d611 (diff)
downloadscala-2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9.tar.gz
scala-2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9.tar.bz2
scala-2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9.zip
- Updated files to the new syntax.
Diffstat (limited to 'test/files/pos/MailBox.scala')
-rw-r--r--test/files/pos/MailBox.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/files/pos/MailBox.scala b/test/files/pos/MailBox.scala
index 3a633e3fbe..4e275cedbd 100644
--- a/test/files/pos/MailBox.scala
+++ b/test/files/pos/MailBox.scala
@@ -26,7 +26,8 @@ class MailBox {
private var lastReceiver = receivers;
def send(msg: Any): unit = synchronized {
- var r = receivers, r1 = r.next;
+ var r = receivers;
+ var r1 = r.next;
while (r1 != null && !r1.elem.isDefined(msg)) {
r = r1; r1 = r1.next;
}
@@ -39,7 +40,8 @@ class MailBox {
def receive[a](f: PartialFunction[Any, a]): a = {
val msg: Any = synchronized {
- var s = sent, s1 = s.next;
+ var s = sent;
+ var s1 = s.next;
while (s1 != null && !f.isDefinedAt(s1.elem)) {
s = s1; s1 = s1.next
}
@@ -59,7 +61,8 @@ class MailBox {
def receiveWithin[a](msec: long)(f: PartialFunction[Any, a]): a = {
val msg: Any = synchronized {
- var s = sent, s1 = s.next;
+ var s = sent;
+ var s1 = s.next;
while (s1 != null && !f.isDefinedAt(s1.elem)) {
s = s1; s1 = s1.next ;
}