diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-03-11 23:07:08 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-03-11 23:07:08 +0000 |
commit | 0254234328ab8a438aac649234bd5e12614f8ff9 (patch) | |
tree | 41ad8758e6697ac64881e3df471030d4921c4bac /src/library | |
parent | 8f245d95f683dec681ea98406c438da32409c088 (diff) | |
download | scala-0254234328ab8a438aac649234bd5e12614f8ff9.tar.gz scala-0254234328ab8a438aac649234bd5e12614f8ff9.tar.bz2 scala-0254234328ab8a438aac649234bd5e12614f8ff9.zip |
Fixes the broken test, introduced in the view p...
Fixes the broken test, introduced in the view patch commit.
No review.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/parallel/ParSeqLike.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/collection/parallel/ParSeqLike.scala b/src/library/scala/collection/parallel/ParSeqLike.scala index 9ac647cf5a..d40ced0cd8 100644 --- a/src/library/scala/collection/parallel/ParSeqLike.scala +++ b/src/library/scala/collection/parallel/ParSeqLike.scala @@ -262,9 +262,10 @@ self => } else patch_sequential(from, patch, replaced) } - private def patch_sequential[U >: T, That](from: Int, patch: Seq[U], r: Int)(implicit bf: CanBuildFrom[Repr, U, That]): That = { + private def patch_sequential[U >: T, That](fromarg: Int, patch: Seq[U], r: Int)(implicit bf: CanBuildFrom[Repr, U, That]): That = { + val from = 0 max fromarg val b = bf(repr) - val repl = r min (length - from) + val repl = (r min (length - from)) max 0 val pits = parallelIterator.psplit(from, repl, length - from - repl) b ++= pits(0) b ++= patch.iterator |