diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-05-04 10:46:29 +0200 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-05-04 10:48:57 +0200 |
commit | 628eaa5aca0117823327571a1384f0d717fd7b4e (patch) | |
tree | 4b0826cea24d0c94c15bbca0b23e6b177336682d /src/library/scala/collection/MapLike.scala | |
parent | f146d5826fc335ee1ca9c285d69086a7475cb71e (diff) | |
download | scala-628eaa5aca0117823327571a1384f0d717fd7b4e.tar.gz scala-628eaa5aca0117823327571a1384f0d717fd7b4e.tar.bz2 scala-628eaa5aca0117823327571a1384f0d717fd7b4e.zip |
Fix for si-5018.
Methods keySet, values and withDefault now return serializable collections.
Diffstat (limited to 'src/library/scala/collection/MapLike.scala')
-rw-r--r-- | src/library/scala/collection/MapLike.scala | 4 |
1 files changed, 2 insertions, 2 deletions
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 |