summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-09-05 14:15:01 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-09-06 09:32:17 -0400
commit93d3cc703806bec34c4ef0c7817239966363c193 (patch)
treeed2834b1ba8df37c4e82462c541aaec9c230c278 /src/library
parent2355b656e030a7b968aa02de9a688f565b147581 (diff)
downloadscala-93d3cc703806bec34c4ef0c7817239966363c193.tar.gz
scala-93d3cc703806bec34c4ef0c7817239966363c193.tar.bz2
scala-93d3cc703806bec34c4ef0c7817239966363c193.zip
Fixes SI-6271 - Missing isEmpty override for views.
GenIterableView didn't override isEmpty for views to look at *filtered* iterator, but was instead pulling unfiltered iterator and causing issues. Chalk up another bizzare bug to lack of insight/visibility into linearization and what havoc overriding new methods can spew on our library.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/collection/GenIterableViewLike.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library/scala/collection/GenIterableViewLike.scala b/src/library/scala/collection/GenIterableViewLike.scala
index 9e3927eaf4..142561df20 100644
--- a/src/library/scala/collection/GenIterableViewLike.scala
+++ b/src/library/scala/collection/GenIterableViewLike.scala
@@ -25,6 +25,7 @@ self =>
def iterator: Iterator[B]
override def foreach[U](f: B => U): Unit = iterator foreach f
override def toString = viewToString
+ override def isEmpty = !iterator.hasNext
}
trait EmptyView extends Transformed[Nothing] with super.EmptyView {