diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-19 19:38:24 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-19 19:38:24 +0000 |
commit | 6915c987ac15d8c3d6bf5b479222561da66cf611 (patch) | |
tree | 781f3d4114b19b749d087ad5f3087c8471445f02 /src/library/scala/collection/immutable/MapLike.scala | |
parent | d2726ea60562d1603a0fa11dacd9ddc51015b6ca (diff) | |
download | scala-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/MapLike.scala')
-rw-r--r-- | src/library/scala/collection/immutable/MapLike.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/collection/immutable/MapLike.scala b/src/library/scala/collection/immutable/MapLike.scala index f669268a88..0a3a8a3645 100644 --- a/src/library/scala/collection/immutable/MapLike.scala +++ b/src/library/scala/collection/immutable/MapLike.scala @@ -41,8 +41,9 @@ import generic._ * @version 2.8 * @since 2.8 */ -trait MapLike[A, +B, +This <: MapLike[A, B, This] with Map[A, B]] extends scala.collection.MapLike[A, B, This] { -self => +trait MapLike[A, +B, +This <: MapLike[A, B, This] with Map[A, B]] + extends scala.collection.MapLike[A, B, This] +{ self => import scala.collection.Traversable |