From db50a62b625d9685394557fad3a1a101c843df07 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 10 May 2010 15:51:46 +0000 Subject: Made builder in MutableMapFactory use += instea... Made builder in MutableMapFactory use += instead of +. --- .../scala/collection/generic/MutableMapFactory.scala | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/library/scala/collection/generic/MutableMapFactory.scala b/src/library/scala/collection/generic/MutableMapFactory.scala index 2fdb827d05..76ffc9faeb 100644 --- a/src/library/scala/collection/generic/MutableMapFactory.scala +++ b/src/library/scala/collection/generic/MutableMapFactory.scala @@ -12,12 +12,19 @@ package scala.collection package generic -import mutable.MapBuilder +import mutable.Builder -/** A template for companion objects of `immutable.Map` and subclasses thereof. +/** A template for companion objects of `mutable.Map` and subclasses thereof. * @author Martin Odersky * @version 2.8 * @since 2.8 */ abstract class MutableMapFactory[CC[A, B] <: mutable.Map[A, B] with mutable.MapLike[A, B, CC[A, B]]] - extends MapFactory[CC] + extends MapFactory[CC] { + + /** The default builder for $Coll objects. + * @tparam A the type of the keys + * @tparam B the type of the associated values + */ + override def newBuilder[A, B]: Builder[(A, B), CC[A, B]] = empty[A, B] +} -- cgit v1.2.3