From 84764949e299329e476824c96fb250f72506bacd Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Tue, 8 May 2012 21:53:25 -0400 Subject: Fixes SI-5328. Iterator.patched failed when from=0. It turns out iterator.patched forgot to drop replacement values if they were at the beginning. This is because the index was advancing before checking to see if replaced elements should be dropped. Moved this behavior to the beginning of next. --- test/files/run/t5328.check | 3 +++ test/files/run/t5328.scala | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 test/files/run/t5328.check create mode 100644 test/files/run/t5328.scala (limited to 'test/files/run') diff --git a/test/files/run/t5328.check b/test/files/run/t5328.check new file mode 100644 index 0000000000..77a43968c5 --- /dev/null +++ b/test/files/run/t5328.check @@ -0,0 +1,3 @@ +2 +1,2,8 +1,8,3 diff --git a/test/files/run/t5328.scala b/test/files/run/t5328.scala new file mode 100644 index 0000000000..12adf45b84 --- /dev/null +++ b/test/files/run/t5328.scala @@ -0,0 +1,5 @@ +object Test extends App { + println(Vector(1).view.updated(0,2).toList mkString ",") + println(Seq(1,2,3).view.updated(2,8).toList mkString ",") + println(List(1,2,3).view.updated(1,8).toList mkString ",") +} -- cgit v1.2.3