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 /test/files/run/colltest1.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 'test/files/run/colltest1.scala')
-rw-r--r-- | test/files/run/colltest1.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala index 47b273f8ee..557282cb8d 100644 --- a/test/files/run/colltest1.scala +++ b/test/files/run/colltest1.scala @@ -170,7 +170,7 @@ object Test extends Application { m += (("D" -> "D"), ("E" -> "E"), ("F" -> "F")) m ++= List(("G" -> "G"), ("H" -> "H"), ("I" -> "I")) m ++= ('J' to 'Z') map (x => (x.toString -> x.toString)) - println(m) + println(m.toList.sorted) assert(!m.isEmpty) assert(m.keySet forall (k => (m get k) == Some(k))) assert(m.keySet forall (k => (m apply k) == k)) @@ -185,7 +185,7 @@ object Test extends Application { assert(mm.isEmpty, mm) def m3 = empty ++ m1 assert(m1 == m3) - println(m3) + println(m3.toList.sorted) val m4 = m3 filterNot { case (k, v) => k != "A" } assert(m4.size == 1, m4) } |