summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/mutable/BufferLike.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/collection/mutable/BufferLike.scala')
-rw-r--r--src/library/scala/collection/mutable/BufferLike.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library/scala/collection/mutable/BufferLike.scala b/src/library/scala/collection/mutable/BufferLike.scala
index 7ba0b27ce5..3c57387c03 100644
--- a/src/library/scala/collection/mutable/BufferLike.scala
+++ b/src/library/scala/collection/mutable/BufferLike.scala
@@ -211,9 +211,11 @@ trait BufferLike[A, +This <: BufferLike[A, This] with Buffer[A]]
*/
override def stringPrefix: String = "Buffer"
- /** Provide a read-only view of this buffer as a sequence
- * @return A sequence which refers to this buffer for all its operations.
+ /** Returns the current evolving(!) state of this buffer as a read-only sequence.
+ *
+ * @return A sequence that forwards to this buffer for all its operations.
*/
+ @deprecated("The returned sequence changes as this buffer is mutated. For an immutable copy, use, e.g., toList.", "2.11.0")
def readOnly: scala.collection.Seq[A] = toSeq
/** Creates a new collection containing both the elements of this collection and the provided