diff options
author | Paul Phillips <paulp@improving.org> | 2009-11-18 22:06:03 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-11-18 22:06:03 +0000 |
commit | ae024cebd4a41339039f3df91c8aa4a02522594f (patch) | |
tree | 07c5e3a27ce4636f76eb73fe43353fc6c6aa0362 /test/files/run/Course-2002-09.scala | |
parent | 536955e1afd68ac6f99f0347fa14a58ab47cb958 (diff) | |
download | scala-ae024cebd4a41339039f3df91c8aa4a02522594f.tar.gz scala-ae024cebd4a41339039f3df91c8aa4a02522594f.tar.bz2 scala-ae024cebd4a41339039f3df91c8aa4a02522594f.zip |
Finally completed the incredibly tedious task o...
Finally completed the incredibly tedious task of removing the lower case
primitive aliases from Predef. Had to rebuild msil.jar along the way.
Diffstat (limited to 'test/files/run/Course-2002-09.scala')
-rw-r--r-- | test/files/run/Course-2002-09.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/run/Course-2002-09.scala b/test/files/run/Course-2002-09.scala index fac39e0841..384a91efd8 100644 --- a/test/files/run/Course-2002-09.scala +++ b/test/files/run/Course-2002-09.scala @@ -81,7 +81,7 @@ class Constant(q: Quantity, v: Double) extends Constraint { class Probe(name: String, q: Quantity) extends Constraint { def newValue: Unit = printProbe(q.getValue); def dropValue: Unit = printProbe(None); - private def printProbe(v: Option[double]) { + private def printProbe(v: Option[Double]) { val vstr = v match { case Some(x) => x.toString() case None => "?" @@ -103,7 +103,7 @@ class Quantity() { if (v != v1) error("Error! contradiction: " + v + " and " + v1); case None => informant = setter; value = Some(v); - for (val c <- constraints; !(c == informant)) { + for (c <- constraints; if !(c == informant)) { c.newValue; } } @@ -112,7 +112,7 @@ class Quantity() { def forgetValue(retractor: Constraint): Unit = { if (retractor == informant) { value = None; - for (val c <- constraints; !(c == informant)) c.dropValue; + for (c <- constraints; if !(c == informant)) c.dropValue; } } def forgetValue: Unit = forgetValue(NoConstraint); @@ -258,7 +258,7 @@ object M2 { }; } - def show(x: Option[int], y: Option[Int], z: Option[int]) = { + def show(x: Option[Int], y: Option[Int], z: Option[Int]) = { Console.print("a = " +set(a,x)+ ", b = " +set(b,y)+ ", c = " +set(c,z)); Console.println(" => " + a.str + " * " + b.str + " = " + c.str); a.forgetValue; b.forgetValue; c.forgetValue; |