diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-02-03 13:15:09 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-02-03 13:15:09 +0100 |
commit | fc5442780d74bce507146289f6013ef4056e1ec5 (patch) | |
tree | f0cb147ca8a7f2eda755e55319886fc802595e19 /src/library | |
parent | 92dce69d5d91d6040b106230827bf7c4f07aea51 (diff) | |
parent | 08f27bbd41d91122d96ad58a70a42e55483c8b2b (diff) | |
download | scala-fc5442780d74bce507146289f6013ef4056e1ec5.tar.gz scala-fc5442780d74bce507146289f6013ef4056e1ec5.tar.bz2 scala-fc5442780d74bce507146289f6013ef4056e1ec5.zip |
Merge pull request #4233 from kanielc/SI-7770
SI-7770 mutable.BitSet.toImmutable isn't immutable
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/mutable/BitSet.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library/scala/collection/mutable/BitSet.scala b/src/library/scala/collection/mutable/BitSet.scala index faa4155317..78150b5e88 100644 --- a/src/library/scala/collection/mutable/BitSet.scala +++ b/src/library/scala/collection/mutable/BitSet.scala @@ -160,6 +160,9 @@ class BitSet(protected final var elems: Array[Long]) extends AbstractSet[Int] * * @return an immutable set containing all the elements of this set. */ + @deprecated("If this BitSet contains a value that is 128 or greater, the result of this method is an 'immutable' " + + "BitSet that shares state with this mutable BitSet. Thus, if the mutable BitSet is modified, it will violate the " + + "immutability of the result.", "2.11.6") def toImmutable = immutable.BitSet.fromBitMaskNoCopy(elems) override def clone(): BitSet = { |