diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/immutable/Vector.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/collection/immutable/Vector.scala b/src/library/scala/collection/immutable/Vector.scala index cd2d3f843b..5a9734a99e 100644 --- a/src/library/scala/collection/immutable/Vector.scala +++ b/src/library/scala/collection/immutable/Vector.scala @@ -156,7 +156,7 @@ override def companion: GenericCompanion[Vector] = Vector override def take(n: Int): Vector[A] = { if (n <= 0) Vector.empty - else if (startIndex + n < endIndex) + else if (startIndex < endIndex - n) dropBack0(startIndex + n) else this @@ -165,7 +165,7 @@ override def companion: GenericCompanion[Vector] = Vector override def drop(n: Int): Vector[A] = { if (n <= 0) this - else if (startIndex + n < endIndex) + else if (startIndex < endIndex - n) dropFront0(startIndex + n) else Vector.empty |