Removed deprecation warnings in auction.scala and producers.scala. Small clean up of links.scala.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@15690 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
phaller 2008-08-04 14:54:39 +00:00
parent 31f9b5c2ff
commit cb0f0afcc7
3 changed files with 5 additions and 5 deletions

View File

@ -69,7 +69,7 @@ class AuctionActor(seller: Actor, minBid: Int, closing: Date) extends Actor {
object auction {
val random = new Random
val random = new scala.util.Random
val minBid = 100
val closing = new Date(new Date().getTime() + 4000)

View File

@ -17,7 +17,7 @@ object links extends Application {
else top(p(n-1), n)
def top(a: Actor, n: Int): Actor = actor {
println("starting actor " + n + " (" + Thread.currentThread() + ")")
println("starting actor " + n + " (" + self + ")")
self.trapExit = true
link(a)
loop {
@ -34,7 +34,7 @@ object links extends Application {
}
def top1(): Actor = actor {
println("starting last actor" + " (" + Thread.currentThread() + ")")
println("starting last actor" + " (" + self + ")")
receive {
case Stop =>
println("Last actor now exiting")

View File

@ -64,8 +64,8 @@ abstract class Producer[T] {
object producers extends Application {
class Tree(val left: Tree, val elem: Int, val right: Tree)
def node(left: Tree, elem: int, right: Tree): Tree = new Tree(left, elem, right)
def node(elem: int): Tree = node(null, elem, null)
def node(left: Tree, elem: Int, right: Tree): Tree = new Tree(left, elem, right)
def node(elem: Int): Tree = node(null, elem, null)
def tree = node(node(node(3), 4, node(6)), 8, node(node(9), 10, node(11)))