summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-05-08 22:26:00 +0000
committerPaul Phillips <paulp@improving.org>2009-05-08 22:26:00 +0000
commit68bb95dc3553a5b4f8def3a158df268a1df7ae51 (patch)
treea67a2fcd222ea42d1bb76d4fd57c644ab9de0ce4
parent974735b01f3c08d9fef02b8ab5f086d2d689a590 (diff)
downloadscala-68bb95dc3553a5b4f8def3a158df268a1df7ae51.tar.gz
scala-68bb95dc3553a5b4f8def3a158df268a1df7ae51.tar.bz2
scala-68bb95dc3553a5b4f8def3a158df268a1df7ae51.zip
Small change to Stream so force wouldn't always...
Small change to Stream so force wouldn't always throw an exception.
-rw-r--r--src/library/scala/collection/immutable/Stream.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala
index 20e71181e7..31cc0762d3 100644
--- a/src/library/scala/collection/immutable/Stream.scala
+++ b/src/library/scala/collection/immutable/Stream.scala
@@ -76,7 +76,7 @@ self =>
/** Force evaluation of the whole stream and return it */
def force: Stream[A] = {
var these = this
- while (!isEmpty) these = these.tail
+ while (!these.isEmpty) these = these.tail
this
}