From b169da1399e958844bf2cfe349ff6bd6206d0526 Mon Sep 17 00:00:00 2001 From: michelou Date: Tue, 17 Jan 2006 16:29:58 +0000 Subject: added parenthis around boolean expression in te... added parenthis around boolean expression in test/files/pos/traits.scala --- test/files/pos/traits.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/files') 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) } -- cgit v1.2.3