diff options
Diffstat (limited to 'src/strawman')
-rw-r--r-- | src/strawman/collections/CollectionStrawMan6.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strawman/collections/CollectionStrawMan6.scala b/src/strawman/collections/CollectionStrawMan6.scala index 654228c5b..50de63488 100644 --- a/src/strawman/collections/CollectionStrawMan6.scala +++ b/src/strawman/collections/CollectionStrawMan6.scala @@ -886,11 +886,11 @@ object CollectionStrawMan6 extends LowPriority { } /** View defined in terms of indexing a range */ - trait IndexedView[+A] extends View[A] with ArrayLike[A] { + trait IndexedView[+A] extends View[A] with ArrayLike[A] { self => def iterator: Iterator[A] = new Iterator[A] { private var current = 0 - def hasNext = current < length + def hasNext = current < self.length def next: A = { val r = apply(current) current += 1 @@ -908,7 +908,7 @@ object CollectionStrawMan6 extends LowPriority { class Take[A](underlying: IndexedView[A], n: Int) extends View.Take(underlying, n) with IndexedView[A] { - override def iterator = super.iterator + override def iterator = super.iterator // needed to avoid "conflicting overrides" error def length = underlying.length min normN def apply(i: Int) = underlying.apply(i) } |