summaryrefslogtreecommitdiff
path: root/test/files/pos/traits.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/traits.scala')
-rw-r--r--test/files/pos/traits.scala16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/files/pos/traits.scala b/test/files/pos/traits.scala
index 1418757442..8dcd9c0b5f 100644
--- a/test/files/pos/traits.scala
+++ b/test/files/pos/traits.scala
@@ -1,17 +1,17 @@
object Test {
- type Color = int;
+ type Color = Int
trait Shape {
override def equals(other: Any) = true
}
trait Bordered extends Shape {
- val thickness: int;
+ val thickness: Int
override def equals(other: Any) = other match {
case that: Bordered => this.thickness == that.thickness
case _ => false
}
}
trait Colored extends Shape {
- val color: Color;
+ val color: Color
override def equals(other: Any) = other match {
case that: Colored => this.color == that.color
case _ => false
@@ -28,13 +28,13 @@ object Test {
}
val bcs1 = new BorderedColoredShape {
- val thickness = 1;
- val color = 0;
+ val thickness = 1
+ val color = 0
}
val bcs2 = new BorderedColoredShape {
- val thickness = 2;
- val color = 0;
+ val thickness = 2
+ val color = 0
}
- Console.println(bcs1 == bcs1);
+ Console.println(bcs1 == bcs1)
Console.println(bcs1 == bcs2)
}