From 8155f5e712b80a3136c4e08362b8d85b1ef52d60 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 7 May 2009 15:43:48 +0000 Subject: 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. --- test/files/run/bug1300.check | 1 + test/files/run/bug1300.scala | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test/files/run/bug1300.check create mode 100644 test/files/run/bug1300.scala (limited to 'test/files/run') 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 -- cgit v1.2.3