summaryrefslogtreecommitdiff
path: root/test/files/run/withIndex.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-07-23 18:22:29 +0000
committerMartin Odersky <odersky@gmail.com>2007-07-23 18:22:29 +0000
commit16d3cf1f8f22c04559145b35bb5f6c0aacfb0d8c (patch)
tree75b5420467e9dae2ef88d6a4aca220b0f907fa2f /test/files/run/withIndex.scala
parent2d3a640e0bff8c79f99c070cf33f9ef921642a18 (diff)
downloadscala-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.scala7
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