summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2005-08-26 15:17:13 +0000
committermihaylov <mihaylov@epfl.ch>2005-08-26 15:17:13 +0000
commit7d50bd127a071b84cc3d5e6e989b5f57d5988aaf (patch)
tree4150782d52b5f6a541eed6b9b91dad0c0a93b82b /sources
parentbc6f997f0a06bf2c8b2e05d34623474a7f91a986 (diff)
downloadscala-7d50bd127a071b84cc3d5e6e989b5f57d5988aaf.tar.gz
scala-7d50bd127a071b84cc3d5e6e989b5f57d5988aaf.tar.bz2
scala-7d50bd127a071b84cc3d5e6e989b5f57d5988aaf.zip
Use the new syntax for def parameters
Diffstat (limited to 'sources')
-rw-r--r--sources/examples/computeserver.scala2
-rw-r--r--sources/examples/jolib/parallelOr.scala2
-rw-r--r--sources/examples/pilib/rwlock.scala2
-rw-r--r--sources/examples/pilib/semaphore.scala2
4 files changed, 4 insertions, 4 deletions
diff --git a/sources/examples/computeserver.scala b/sources/examples/computeserver.scala
index f86f41e3ff..acc4a0b93e 100644
--- a/sources/examples/computeserver.scala
+++ b/sources/examples/computeserver.scala
@@ -20,7 +20,7 @@ class ComputeServer(n: Int) {
}
}
- def future[a](def p: a): () => a = {
+ def future[a](p: => a): () => a = {
val reply = new SyncVar[a]();
openJobs.write{
new Job {
diff --git a/sources/examples/jolib/parallelOr.scala b/sources/examples/jolib/parallelOr.scala
index c81de6b0e0..bff4dcd87a 100644
--- a/sources/examples/jolib/parallelOr.scala
+++ b/sources/examples/jolib/parallelOr.scala
@@ -35,7 +35,7 @@ object or extends Join {
r.set(b) })
);
- def apply(def b1: boolean, def b2: boolean): boolean = {
+ def apply(b1: => boolean, b2: => boolean): boolean = {
concurrent.ops.spawn(res1(res1.C(b1)));
concurrent.ops.spawn(res2(res2.C(b2)));
res(res.C())
diff --git a/sources/examples/pilib/rwlock.scala b/sources/examples/pilib/rwlock.scala
index 3b6ba70460..0ed0f71a47 100644
--- a/sources/examples/pilib/rwlock.scala
+++ b/sources/examples/pilib/rwlock.scala
@@ -66,7 +66,7 @@ object rwlock {
}
}
- def await(def cond: boolean): unit = while (false == cond) (Wait)
+ def await(cond: => boolean): unit = while (false == cond) (Wait)
}
/*
diff --git a/sources/examples/pilib/semaphore.scala b/sources/examples/pilib/semaphore.scala
index e41a5de024..cfb0c8e5a2 100644
--- a/sources/examples/pilib/semaphore.scala
+++ b/sources/examples/pilib/semaphore.scala
@@ -50,7 +50,7 @@ object semaphore {
def main(args: Array[String]): unit = {
val random = new java.util.Random();
val sem = new Sem2;
- def mutex(def p: unit): unit = { sem.get; p; sem.release }
+ def mutex(p: => unit): unit = { sem.get; p; sem.release }
spawn< {
Thread.sleep(1 + random.nextInt(100));