summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/MapProxy.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-03-19 19:38:24 +0000
committerPaul Phillips <paulp@improving.org>2010-03-19 19:38:24 +0000
commit6915c987ac15d8c3d6bf5b479222561da66cf611 (patch)
tree781f3d4114b19b749d087ad5f3087c8471445f02 /src/library/scala/collection/immutable/MapProxy.scala
parentd2726ea60562d1603a0fa11dacd9ddc51015b6ca (diff)
downloadscala-6915c987ac15d8c3d6bf5b479222561da66cf611.tar.gz
scala-6915c987ac15d8c3d6bf5b479222561da66cf611.tar.bz2
scala-6915c987ac15d8c3d6bf5b479222561da66cf611.zip
More fun with -Xmigration.
to BufferLike (++ and similar now create a new collection.) Removed MapLikeBase. Annotated all the methods in mutable.{ Map, Set } which mutated in-place in 2.7 to note that they create new collections, and implemented same. At this point the only +/- like method which mutates in place which I am aware of is BufferLike.+ (see source comment for my observations.) Also tweaked some collections return types as necessitated by these changes, such as mutable.Set.clone() now returning "This" rather than mutable.Set[A]. References #3089, closes #3179. Review by odersky.
Diffstat (limited to 'src/library/scala/collection/immutable/MapProxy.scala')
-rw-r--r--src/library/scala/collection/immutable/MapProxy.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/MapProxy.scala b/src/library/scala/collection/immutable/MapProxy.scala
index 84775c9a82..371af042e7 100644
--- a/src/library/scala/collection/immutable/MapProxy.scala
+++ b/src/library/scala/collection/immutable/MapProxy.scala
@@ -37,6 +37,7 @@ trait MapProxy[A, +B] extends Map[A, B] with MapProxyLike[A, B, Map[A, B]]
override def + [B1 >: B](kv: (A, B1)): Map[A, B1] = newProxy(self + kv)
override def + [B1 >: B](elem1: (A, B1), elem2: (A, B1), elems: (A, B1) *) =
newProxy(self.+(elem1, elem2, elems: _*))
+
override def -(key: A) = newProxy(self - key)
override def filterKeys(p: A => Boolean) = self.filterKeys(p)