diff options
-rw-r--r-- | src/library/scala/collection/mutable/Map.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/library/scala/collection/mutable/Map.scala b/src/library/scala/collection/mutable/Map.scala index 1c6dc04c13..44b18e20ae 100644 --- a/src/library/scala/collection/mutable/Map.scala +++ b/src/library/scala/collection/mutable/Map.scala @@ -166,10 +166,9 @@ trait Map[A, B] extends AnyRef def getOrElseUpdate(key: A, default: =>B): B = get(key) match { case Some(v) => v - case None => this(key) = default; default + case None => val d = default; this(key) = d; d } - /** This function transforms all the values of mappings contained * in this map with function <code>f</code>. * |