diff options
author | michelou <michelou@epfl.ch> | 2008-06-10 08:46:06 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2008-06-10 08:46:06 +0000 |
commit | a4baf28d203959457d82762e27ffbb7104dc0a07 (patch) | |
tree | 7b249d126396b87cd937da6cd564000b8a6051de /test/files/pos/traits.scala | |
parent | 113c79559555dd408ea76da5f462025536cbd7d6 (diff) | |
download | scala-a4baf28d203959457d82762e27ffbb7104dc0a07.tar.gz scala-a4baf28d203959457d82762e27ffbb7104dc0a07.tar.bz2 scala-a4baf28d203959457d82762e27ffbb7104dc0a07.zip |
int -> Int, etc..
Diffstat (limited to 'test/files/pos/traits.scala')
-rw-r--r-- | test/files/pos/traits.scala | 16 |
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) } |