diff options
author | michelou <michelou@epfl.ch> | 2006-01-17 16:29:58 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-01-17 16:29:58 +0000 |
commit | b169da1399e958844bf2cfe349ff6bd6206d0526 (patch) | |
tree | a3eb6bfffda068d00d12bf49a317cd2e8d801cc7 /test/files | |
parent | c4b0b7f47627c5b2025b4420c3110dbb65f8dfee (diff) | |
download | scala-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')
-rw-r--r-- | test/files/pos/traits.scala | 12 |
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) } |