diff options
author | paltherr <paltherr@epfl.ch> | 2003-12-04 15:17:55 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-12-04 15:17:55 +0000 |
commit | 9370a1e00177d77624f68983ec6009b468a4337b (patch) | |
tree | ca78d69eb772a3826577717a607280839f5cd7d6 /test/files/run/Course-2002-09.scala | |
parent | 082d612f19cf3e78f76337da6ff496ef5c96fd28 (diff) | |
download | scala-9370a1e00177d77624f68983ec6009b468a4337b.tar.gz scala-9370a1e00177d77624f68983ec6009b468a4337b.tar.bz2 scala-9370a1e00177d77624f68983ec6009b468a4337b.zip |
- Fixed for flattened value types
Diffstat (limited to 'test/files/run/Course-2002-09.scala')
-rw-r--r-- | test/files/run/Course-2002-09.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/Course-2002-09.scala b/test/files/run/Course-2002-09.scala index b984fbf9d2..6468b012a5 100644 --- a/test/files/run/Course-2002-09.scala +++ b/test/files/run/Course-2002-09.scala @@ -35,8 +35,8 @@ class Adder(a1: Quantity,a2: Quantity,sum: Quantity) extends Constraint { class Multiplier(m1: Quantity, m2: Quantity, prod: Quantity) extends Constraint { def newValue = Triple(m1.getValue, m2.getValue, prod.getValue) match { - case Triple(Some( 0), _ , _ ) => prod.setValue(0, this); - case Triple(_ , Some( 0), _ ) => prod.setValue(0, this); + case Triple(Some(0d), _ , _ ) => prod.setValue(0, this); + case Triple(_ , Some(0d), _ ) => prod.setValue(0, this); case Triple(Some(x1), Some(x2), _ ) => prod.setValue(x1 * x2, this) case Triple(Some(x1), _ , Some(r)) => m2.setValue(r / x1, this) case Triple(_, Some(x2), Some(r)) => m1.setValue(r / x2, this) |