diff options
author | Martin Odersky <odersky@gmail.com> | 2007-07-23 18:22:29 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-07-23 18:22:29 +0000 |
commit | 16d3cf1f8f22c04559145b35bb5f6c0aacfb0d8c (patch) | |
tree | 75b5420467e9dae2ef88d6a4aca220b0f907fa2f /test/files/run/withIndex.scala | |
parent | 2d3a640e0bff8c79f99c070cf33f9ef921642a18 (diff) | |
download | scala-16d3cf1f8f22c04559145b35bb5f6c0aacfb0d8c.tar.gz scala-16d3cf1f8f22c04559145b35bb5f6c0aacfb0d8c.tar.bz2 scala-16d3cf1f8f22c04559145b35bb5f6c0aacfb0d8c.zip |
many bug fixes; short syntax for structural types.
Diffstat (limited to 'test/files/run/withIndex.scala')
-rw-r--r-- | test/files/run/withIndex.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/files/run/withIndex.scala b/test/files/run/withIndex.scala index fd79cd808a..d06dde89f0 100644 --- a/test/files/run/withIndex.scala +++ b/test/files/run/withIndex.scala @@ -9,7 +9,12 @@ object Test { Console.println(lst.zipWithIndex.toList) Console.println(itr.zipWithIndex.toList) Console.println(str.zipWithIndex.toList) - assert(ary.zipWithIndex.isInstanceOf[Array[Pair[String,Int]]]) + assert { + ary.zipWithIndex match { + case _: Array[Pair[String,Int]] => true + case _ => false + } + } val emptyArray = new Array[String](0) val emptyList: List[String] = Nil |