summaryrefslogtreecommitdiff
path: root/test/files/pos/traits.scala
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2006-01-17 16:29:58 +0000
committermichelou <michelou@epfl.ch>2006-01-17 16:29:58 +0000
commitb169da1399e958844bf2cfe349ff6bd6206d0526 (patch)
treea3eb6bfffda068d00d12bf49a317cd2e8d801cc7 /test/files/pos/traits.scala
parentc4b0b7f47627c5b2025b4420c3110dbb65f8dfee (diff)
downloadscala-b169da1399e958844bf2cfe349ff6bd6206d0526.tar.gz
scala-b169da1399e958844bf2cfe349ff6bd6206d0526.tar.bz2
scala-b169da1399e958844bf2cfe349ff6bd6206d0526.zip
added parenthis around boolean expression in te...
added parenthis around boolean expression in test/files/pos/traits.scala
Diffstat (limited to 'test/files/pos/traits.scala')
-rw-r--r--test/files/pos/traits.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/pos/traits.scala b/test/files/pos/traits.scala
index 5fdf4b342e..d2c3f7c71b 100644
--- a/test/files/pos/traits.scala
+++ b/test/files/pos/traits.scala
@@ -1,28 +1,28 @@
object Test {
type Color = int;
trait Shape {
- override def equals(other: Any) = true;
+ override def equals(other: Any) = true
}
trait Bordered extends Shape {
val thickness: int;
override def equals(other: Any) = other match {
- case that: Bordered => this.thickness == that.thickness;
+ case that: Bordered => this.thickness == that.thickness
case _ => false
}
}
trait Colored extends Shape {
val color: Color;
override def equals(other: Any) = other match {
- case that: Colored => this.color == that.color;
+ case that: Colored => this.color == that.color
case _ => false
}
}
trait BorderedColoredShape extends Shape with Bordered with Colored {
override def equals(other: Any) = other match {
- case that: BorderedColoredShape =>
+ case that: BorderedColoredShape => (
super.equals(that) &&
super[Bordered].equals(that) &&
- super[Colored].equals(that)
+ super[Colored].equals(that))
case _ => false
}
}
@@ -36,7 +36,7 @@ object Test {
val color = 0;
}
System.out.println(bcs1 == bcs1);
- System.out.println(bcs1 == bcs2);
+ System.out.println(bcs1 == bcs2)
}