diff options
author | Martin Odersky <odersky@gmail.com> | 2007-01-22 22:17:43 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-01-22 22:17:43 +0000 |
commit | e3e918acdb1225312f1d13f6fdc7b1073aae39b2 (patch) | |
tree | a656f3858fd7d0d5c983ed6ccac14820652c2536 /src/actors | |
parent | 6c4b4f89c8f5230027a583c7b51b3d19195069f4 (diff) | |
download | scala-e3e918acdb1225312f1d13f6fdc7b1073aae39b2.tar.gz scala-e3e918acdb1225312f1d13f6fdc7b1073aae39b2.tar.bz2 scala-e3e918acdb1225312f1d13f6fdc7b1073aae39b2.zip |
fixed problems with build.
Diffstat (limited to 'src/actors')
-rw-r--r-- | src/actors/scala/actors/Channel.scala | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/actors/scala/actors/Channel.scala b/src/actors/scala/actors/Channel.scala index f17c95f53f..700082f0dc 100644 --- a/src/actors/scala/actors/Channel.scala +++ b/src/actors/scala/actors/Channel.scala @@ -24,7 +24,7 @@ class SuspendActorException extends Throwable { } } -case class ![a](ch: Channel[a], msg: a) +case class ! [a](ch: Channel[a], msg: a) /** * This class provides a means for typed communication among @@ -58,14 +58,16 @@ class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] { } def receive[R](f: PartialFunction[Any, R]): R = { - val C = this + val C = this.asInstanceOf[Channel[Any]] + // Martin: had to do this to get it to compiler after bug909 fix receiver.receive { case C ! msg if (f.isDefinedAt(msg)) => f(msg) } } def receiveWithin[R](msec: long)(f: PartialFunction[Any, R]): R = { - val C = this + val C = this.asInstanceOf[Channel[Any]] + // Martin: had to do this to get it to compiler after bug909 fix receiver.receiveWithin(msec) { case C ! msg if (f.isDefinedAt(msg)) => f(msg) case TIMEOUT => f(TIMEOUT) @@ -73,14 +75,16 @@ class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] { } def react(f: PartialFunction[Any, Unit]): Nothing = { - val C = this + val C = this.asInstanceOf[Channel[Any]] + // Martin: had to do this to get it to compiler after bug909 fix receiver.react { case C ! msg if (f.isDefinedAt(msg)) => f(msg) } } def reactWithin(msec: long)(f: PartialFunction[Any, Unit]): Nothing = { - val C = this + val C = this.asInstanceOf[Channel[Any]] + // Martin: had to do this to get it to compiler after bug909 fix receiver.reactWithin(msec) { case C ! msg if (f.isDefinedAt(msg)) => f(msg) case TIMEOUT => f(TIMEOUT) |