diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/mutable/MapLike.scala | 5 |
1 files 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 } |