diff options
author | buraq <buraq@epfl.ch> | 2004-05-18 10:42:03 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-05-18 10:42:03 +0000 |
commit | 00048f2901012137789f0af5ff5d733a581fc90e (patch) | |
tree | 8750463a865285bd54d2a0842a0e7331f026176e /test/files/run | |
parent | 7432218075b602548bb109fac463077ddc50befd (diff) | |
download | scala-00048f2901012137789f0af5ff5d733a581fc90e.tar.gz scala-00048f2901012137789f0af5ff5d733a581fc90e.tar.bz2 scala-00048f2901012137789f0af5ff5d733a581fc90e.zip |
case classes implement trait scala.CaseClass
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/misc.check | 1 | ||||
-rw-r--r-- | test/files/run/misc.scala | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/misc.check b/test/files/run/misc.check index 0f58c807d6..db16f96a94 100644 --- a/test/files/run/misc.check +++ b/test/files/run/misc.check @@ -32,3 +32,4 @@ X::foo 3 3 +true diff --git a/test/files/run/misc.scala b/test/files/run/misc.scala index 0878b8142f..4a16146c7f 100644 --- a/test/files/run/misc.scala +++ b/test/files/run/misc.scala @@ -229,6 +229,19 @@ System.out.println(new O(1).foo) System.out.println(); + case class Bar(); + + case class Foo(i:int, j:char, c:Bar) ; + + Console.println( + Foo(3,'a',Bar()).selectElement( 0 ) == null + && Foo(3,'a',Bar()).selectElement( 1 ) == 3 + && Foo(3,'a',Bar()).selectElement( 2 ) == 'a' + && Foo(3,'a',Bar()).selectElement( 3 ) == Bar() + && Foo(3,'a',Bar()).selectElement( 4 ) == null + && Bar().numberOfElements() == 0 + && Foo(3,'a',Bar()).numberOfElements() == 3); + //############################################################################ def main(args: Array[String]): Unit = { |