diff options
author | Matthias Zenger <mzenger@gmail.com> | 2004-02-10 21:44:56 +0000 |
---|---|---|
committer | Matthias Zenger <mzenger@gmail.com> | 2004-02-10 21:44:56 +0000 |
commit | 2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9 (patch) | |
tree | 1c6491de87a0ddb7caa53f0636854bd30e4dc818 /test/files/pos | |
parent | 0b38cbc3c5d5f18c56a0cf9b08ac913a3f21d611 (diff) | |
download | scala-2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9.tar.gz scala-2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9.tar.bz2 scala-2629b94686f6ccecefe2ac80424a7bbd4e6fc4e9.zip |
- Updated files to the new syntax.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/MailBox.scala | 9 | ||||
-rw-r--r-- | test/files/pos/clsrefine.scala | 27 |
2 files changed, 23 insertions, 13 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 ; } diff --git a/test/files/pos/clsrefine.scala b/test/files/pos/clsrefine.scala index 56db9d4c13..d63923b5e6 100644 --- a/test/files/pos/clsrefine.scala +++ b/test/files/pos/clsrefine.scala @@ -3,14 +3,18 @@ import scala._; package scalac.util { trait A { - type X1, X2; - val x1: X1, x2: X2; + type X1; + type X2; + val x1: X1; + val x2: X2; } trait B extends A { type Y; - val y1: Y, y2: Y; - type X1 = Y, X2 = Y; - val x1 = y1, x2 = y2; + val y1, y2: Y; + type X1 = Y; + type X2 = Y; + val x1 = y1; + val x2 = y2; def f(x: Y, xs: B): Unit = {} def g() = f(y1, this); } @@ -18,16 +22,19 @@ trait B extends A { object test { val b: B { type Y = Int } = new B { type Y = Int; - val y1 = 1, y2 = 1; + val y1, y2 = 1; } - val a: A { type X1 = Int, X2 = Int } = b; + val a: A { type X1 = Int; type X2 = Int } = b; val a1 = new A { - type X1 = Int, X2 = String; - val x1 = 1, x2 = "hello" + type X1 = Int; + type X2 = String; + val x1 = 1; + val x2 = "hello" } val b1 = new B { type Y = Any; - val y1 = 1, y2 = "hello"; + val y1 = 1; + val y2 = "hello"; } } }
\ No newline at end of file |