diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/immutable/GenericRange.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/collection/immutable/GenericRange.scala b/src/library/scala/collection/immutable/GenericRange.scala index 9736817035..90779912c0 100644 --- a/src/library/scala/collection/immutable/GenericRange.scala +++ b/src/library/scala/collection/immutable/GenericRange.scala @@ -99,11 +99,11 @@ extends VectorView[T, collection.immutable.Vector[T]] def length: Int = toInt(genericLength) final override def isEmpty = if (step > zero) + if (isInclusive) end < start + else end <= start + else if (isInclusive) end > start else end >= start - else - if (isInclusive) start > end - else start >= end def apply(idx: Int): T = { if (idx < 0 || idx >= length) throw new IndexOutOfBoundsException(idx.toString) |