From f80801c67545a28f61abd1a36a5ef8b5bc337d87 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 16 Mar 2011 06:31:59 +0000 Subject: Deprecation patrol. warnings due to my changing a map from mutable to immutable (which ought to be the good direction) because "def update" still lingers on immutable maps. I counted the days elapsed since it was marked for death (before 2.8.0) and added in the bugliness of what I was looking at and bid it farewell. Now removed: def update on immutable maps. No review. --- src/library/scala/collection/immutable/IntMap.scala | 3 --- src/library/scala/collection/immutable/LongMap.scala | 3 --- src/library/scala/collection/immutable/MapLike.scala | 6 +----- src/library/scala/collection/immutable/TrieIteratorBase.scala | 2 +- 4 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src/library') diff --git a/src/library/scala/collection/immutable/IntMap.scala b/src/library/scala/collection/immutable/IntMap.scala index e96b9252ea..140ba4dbec 100644 --- a/src/library/scala/collection/immutable/IntMap.scala +++ b/src/library/scala/collection/immutable/IntMap.scala @@ -269,9 +269,6 @@ sealed abstract class IntMap[+T] extends Map[Int, T] with MapLike[Int, T, IntMap case IntMap.Nil => IntMap.Tip(key, value); } - @deprecated("use `updated' instead") - override def update[S >: T](key: Int, value: S): IntMap[S] = updated(key, value) - /** * Updates the map, using the provided function to resolve conflicts if the key is already present. * diff --git a/src/library/scala/collection/immutable/LongMap.scala b/src/library/scala/collection/immutable/LongMap.scala index 30a15abfa9..d5f1374540 100644 --- a/src/library/scala/collection/immutable/LongMap.scala +++ b/src/library/scala/collection/immutable/LongMap.scala @@ -267,9 +267,6 @@ sealed abstract class LongMap[+T] extends Map[Long, T] with MapLike[Long, T, Lon case LongMap.Nil => LongMap.Tip(key, value); } - @deprecated("use `updated' instead") - override def update[S >: T](key: Long, value: S): LongMap[S] = updated(key, value) - /** * Updates the map, using the provided function to resolve conflicts if the key is already present. * diff --git a/src/library/scala/collection/immutable/MapLike.scala b/src/library/scala/collection/immutable/MapLike.scala index 7a3f63d481..a0f1632d1e 100644 --- a/src/library/scala/collection/immutable/MapLike.scala +++ b/src/library/scala/collection/immutable/MapLike.scala @@ -6,8 +6,6 @@ ** |/ ** \* */ - - package scala.collection package immutable @@ -124,7 +122,5 @@ trait MapLike[A, +B, +This <: MapLike[A, B, This] with Map[A, B]] for ((key, value) <- this) b += ((key, f(key, value))) b.result } - - @deprecated("use `updated' instead") - def update[B1 >: B](key: A, value: B1): immutable.Map[A, B1] = updated(key, value).asInstanceOf[immutable.Map[A, B1]] } + diff --git a/src/library/scala/collection/immutable/TrieIteratorBase.scala b/src/library/scala/collection/immutable/TrieIteratorBase.scala index b14a39db7e..02126b456f 100644 --- a/src/library/scala/collection/immutable/TrieIteratorBase.scala +++ b/src/library/scala/collection/immutable/TrieIteratorBase.scala @@ -168,7 +168,7 @@ private[immutable] abstract class TrieIteratorBase[+T, CC >: Null <: Iterable[T] val arr: Array[CC] = determineType(m) match { case COLLISION_TYPE => collisionToArray(m) case TRIE_TYPE => getElems(m) - case _ => error("cannot divide single element") + case _ => sys.error("cannot divide single element") } arrayToIterators(arr) } -- cgit v1.2.3