diff options
author | Paul Phillips <paulp@improving.org> | 2009-05-21 14:24:27 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-05-21 14:24:27 +0000 |
commit | eb4eac963d9067bf38aced06021d6ea2d62db48e (patch) | |
tree | 915049928ee5deb8c4fc6bdc38247e354f84fec8 /test | |
parent | 12a88b5900378777efac43f8e72c1afc6215fd60 (diff) | |
download | scala-eb4eac963d9067bf38aced06021d6ea2d62db48e.tar.gz scala-eb4eac963d9067bf38aced06021d6ea2d62db48e.tar.bz2 scala-eb4eac963d9067bf38aced06021d6ea2d62db48e.zip |
Fix and test for #1360 - when passing a sequenc...
Fix and test for #1360 - when passing a sequence to java varargs,
call .toArray on it if it is not already an array.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/bug1360.check | 2 | ||||
-rw-r--r-- | test/files/run/bug1360.scala | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/bug1360.check b/test/files/run/bug1360.check new file mode 100644 index 0000000000..8417e208ae --- /dev/null +++ b/test/files/run/bug1360.check @@ -0,0 +1,2 @@ +[one, two] +[1, 2, 3] diff --git a/test/files/run/bug1360.scala b/test/files/run/bug1360.scala new file mode 100644 index 0000000000..62e7bd664c --- /dev/null +++ b/test/files/run/bug1360.scala @@ -0,0 +1,7 @@ +object Test { + def main(args: Array[String]) { + val seq: Seq[String] = List("one", "two") + println(java.util.Arrays.asList(seq: _*)) + println(java.util.Arrays.asList(Seq(1,2,3): _*)) + } +}
\ No newline at end of file |