diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-01-06 12:33:28 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-01-06 12:33:28 +0000 |
commit | d66a76c1214cb0162931c32b9300f4c1a38b1099 (patch) | |
tree | f2c2492a77ca450f82b171c2b69bd0686669db59 /src/library | |
parent | 2bf84d21a63fb6e19ab54ec0695f235856c10f72 (diff) | |
download | scala-d66a76c1214cb0162931c32b9300f4c1a38b1099.tar.gz scala-d66a76c1214cb0162931c32b9300f4c1a38b1099.tar.bz2 scala-d66a76c1214cb0162931c32b9300f4c1a38b1099.zip |
Fixes #2857. No review.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/mutable/MultiMap.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library/scala/collection/mutable/MultiMap.scala b/src/library/scala/collection/mutable/MultiMap.scala index 8279bd53f8..e335500349 100644 --- a/src/library/scala/collection/mutable/MultiMap.scala +++ b/src/library/scala/collection/mutable/MultiMap.scala @@ -40,7 +40,9 @@ trait MultiMap[A, B] extends Map[A, Set[B]] { def removeBinding(key: A, value: B): this.type = { get(key) match { case None => - case Some(set) => set -= value + case Some(set) => + set -= value + if (set.isEmpty) this -= key } this } |