From b2deee49ce08b47959c5bc3996f3a01194b00866 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 20 Apr 2010 18:07:54 +0000 Subject: Undeprecated @retain as suggested by odersky on... Undeprecated @retain as suggested by odersky on scala-internals 3/24/10. No review. --- src/library/scala/collection/mutable/MapLike.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/library/scala/collection/mutable/MapLike.scala b/src/library/scala/collection/mutable/MapLike.scala index 676a325c9b..f9c0f7232c 100644 --- a/src/library/scala/collection/mutable/MapLike.scala +++ b/src/library/scala/collection/mutable/MapLike.scala @@ -191,9 +191,10 @@ trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]] * * @param p The test predicate */ - @deprecated("cannot be type inferred because of retain in Iterable.") def retain(p: (A, B) => Boolean): this.type = { - for ((k, v) <- this) if (!p(k, v)) -=(k) + for ((k, v) <- this ; if !p(k, v)) + this -= k + this } -- cgit v1.2.3