From 6915c987ac15d8c3d6bf5b479222561da66cf611 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 19 Mar 2010 19:38:24 +0000 Subject: 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. --- test/files/run/arybufgrow.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/run/arybufgrow.scala') diff --git a/test/files/run/arybufgrow.scala b/test/files/run/arybufgrow.scala index 4dccd962f2..35b3233055 100644 --- a/test/files/run/arybufgrow.scala +++ b/test/files/run/arybufgrow.scala @@ -3,7 +3,7 @@ import scala.collection.mutable._; object Test extends Application { val buf = new ArrayBuffer[String]; for(val i <- List.range(0,1000)) { - buf + "hello"; + buf += "hello"; } Console.println("1000 = " + buf.length); -- cgit v1.2.3