diff options
author | Philipp Haller <hallerp@gmail.com> | 2006-07-31 09:20:24 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2006-07-31 09:20:24 +0000 |
commit | 8e569f7fb4177d42cb2abaf79179759adaeae4a3 (patch) | |
tree | 4942b9f2e36dd91fb052921feee00427fecc8ed4 /docs/examples/actors | |
parent | 55561538cdf099875c3f0a1c45ade11c0979916f (diff) | |
download | scala-8e569f7fb4177d42cb2abaf79179759adaeae4a3.tar.gz scala-8e569f7fb4177d42cb2abaf79179759adaeae4a3.tar.bz2 scala-8e569f7fb4177d42cb2abaf79179759adaeae4a3.zip |
Fixed customer passing example.
Diffstat (limited to 'docs/examples/actors')
-rw-r--r-- | docs/examples/actors/customer.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/examples/actors/customer.scala b/docs/examples/actors/customer.scala index 58ba55b014..32787092d1 100644 --- a/docs/examples/actors/customer.scala +++ b/docs/examples/actors/customer.scala @@ -9,9 +9,9 @@ package examples.actors import scala.actors.single.Actor -case class Factorial(n: int, resTo: Actor) +case class Factorial(n: int, resTo: Actor[int]) -class FactorialProcess extends Actor { +class FactorialProcess extends Actor[Factorial] { override def run: unit = { receive { case Factorial(n, resTo) => @@ -28,7 +28,7 @@ class FactorialProcess extends Actor { } } -class MultiplyActor(factor: int, resTo: Actor) extends Actor { +class MultiplyActor(factor: int, resTo: Actor[int]) extends Actor[int] { override def run: unit = receive { case value: int => @@ -41,7 +41,7 @@ object CustomerPassing { val fac = new FactorialProcess fac.start() - val c = new Actor { + val c = new Actor[int] { override def run: unit = { fac ! Factorial(3, this) |