diff options
author | stepancheg <stepancheg@epfl.ch> | 2008-06-09 16:48:34 +0000 |
---|---|---|
committer | stepancheg <stepancheg@epfl.ch> | 2008-06-09 16:48:34 +0000 |
commit | 02271ecb5e0c10cef290090a08b4a7b6bcfd30d2 (patch) | |
tree | af0b2311524a492533c564112ae826b05bd2af12 /src | |
parent | acfc0bf01c6918cc6c1fcff375681a106be33c5b (diff) | |
download | scala-02271ecb5e0c10cef290090a08b4a7b6bcfd30d2.tar.gz scala-02271ecb5e0c10cef290090a08b4a7b6bcfd30d2.tar.bz2 scala-02271ecb5e0c10cef290090a08b4a7b6bcfd30d2.zip |
RandomAccessSeq.empty implementation is Project...
RandomAccessSeq.empty implementation is Projection now.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/RandomAccessSeq.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library/scala/RandomAccessSeq.scala b/src/library/scala/RandomAccessSeq.scala index 363fc72d85..8608456f12 100644 --- a/src/library/scala/RandomAccessSeq.scala +++ b/src/library/scala/RandomAccessSeq.scala @@ -15,10 +15,12 @@ import collection.mutable.ArrayBuffer object RandomAccessSeq { /** The empty sequence */ - val empty : RandomAccessSeq[Nothing] = new RandomAccessSeq[Nothing] { + val empty : RandomAccessSeq[Nothing] = new RandomAccessSeq.Projection[Nothing] { def length = 0 def apply(i: Int): Nothing = throw new NoSuchElementException("empty sequence") override def elements = Iterator.empty + override def projection = this + override def force = this } trait Projection[+A] extends Seq.Projection[A] with RandomAccessSeq[A] { |