summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-05-07 15:43:48 +0000
committerPaul Phillips <paulp@improving.org>2009-05-07 15:43:48 +0000
commit8155f5e712b80a3136c4e08362b8d85b1ef52d60 (patch)
tree4aeb5ee8dde7c52d8631d762519bd6d440c42548 /test/files/run
parentee2d15b908360a415c7e30fdde62a2c9bf5f849f (diff)
downloadscala-8155f5e712b80a3136c4e08362b8d85b1ef52d60.tar.gz
scala-8155f5e712b80a3136c4e08362b8d85b1ef52d60.tar.bz2
scala-8155f5e712b80a3136c4e08362b8d85b1ef52d60.zip
Modernized DRMacIver's languishing array patch ...
Modernized DRMacIver's languishing array patch and added test cases to exercise primitive to any array conversion. This fixes bugs #1300 and #1301.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/bug1300.check1
-rw-r--r--test/files/run/bug1300.scala12
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/bug1300.check b/test/files/run/bug1300.check
new file mode 100644
index 0000000000..0f29a1fef5
--- /dev/null
+++ b/test/files/run/bug1300.check
@@ -0,0 +1 @@
+abcdabcdabcd
diff --git a/test/files/run/bug1300.scala b/test/files/run/bug1300.scala
new file mode 100644
index 0000000000..3d26c0f4da
--- /dev/null
+++ b/test/files/run/bug1300.scala
@@ -0,0 +1,12 @@
+object Test extends Application
+{
+ val a1 = Array(0,1,2,3).toArray[Any]
+ val a2 = Array('a','b','c','d').toArray[Any]
+ val a3 = Array("e","f","g","h").toArray[Any]
+
+ Array.copy(a3, 0, a1, 0, 4)
+ Array.copy(a2, 0, a3, 0, 4)
+ Array.copy(a2, 0, a1, 0, 4)
+
+ println(a1.mkString + a2.mkString + a3.mkString)
+} \ No newline at end of file