diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/Map.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/MapLike.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/collection/Map.scala b/src/library/scala/collection/Map.scala index a124e60c96..42a56a9c5a 100644 --- a/src/library/scala/collection/Map.scala +++ b/src/library/scala/collection/Map.scala @@ -45,7 +45,7 @@ object Map extends MapFactory[Map] { /** An abstract shell used by { mutable, immutable }.Map but not by collection.Map * because of variance issues. */ - abstract class WithDefault[A, +B](underlying: Map[A, B], d: A => B) extends AbstractMap[A, B] with Map[A, B] { + abstract class WithDefault[A, +B](underlying: Map[A, B], d: A => B) extends AbstractMap[A, B] with Map[A, B] with Serializable { override def size = underlying.size def get(key: A) = underlying.get(key) // removed in 2.9: orElse Some(default(key)) def iterator = underlying.iterator diff --git a/src/library/scala/collection/MapLike.scala b/src/library/scala/collection/MapLike.scala index 034c1a0c0c..b2b687e75a 100644 --- a/src/library/scala/collection/MapLike.scala +++ b/src/library/scala/collection/MapLike.scala @@ -165,7 +165,7 @@ self => /** The implementation class of the set returned by `keySet`. */ - protected class DefaultKeySet extends AbstractSet[A] with Set[A] { + protected class DefaultKeySet extends AbstractSet[A] with Set[A] with Serializable { def contains(key : A) = self.contains(key) def iterator = keysIterator def + (elem: A): Set[A] = (Set[A]() ++ this + elem).asInstanceOf[Set[A]] // !!! concrete overrides abstract problem @@ -200,7 +200,7 @@ self => /** The implementation class of the iterable returned by `values`. */ - protected class DefaultValuesIterable extends AbstractIterable[B] with Iterable[B] { + protected class DefaultValuesIterable extends AbstractIterable[B] with Iterable[B] with Serializable { def iterator = valuesIterator override def size = self.size override def foreach[C](f: B => C) = self.valuesIterator foreach f |