summaryrefslogtreecommitdiff
path: root/test/files/run/map_test.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-16 06:31:59 +0000
committerPaul Phillips <paulp@improving.org>2011-03-16 06:31:59 +0000
commitf80801c67545a28f61abd1a36a5ef8b5bc337d87 (patch)
tree3282f2469641089d1e540f1fad48c695b4293dd6 /test/files/run/map_test.scala
parentfe9a10c9a0f088f8dc5c47b9cfda51864ec884cc (diff)
downloadscala-f80801c67545a28f61abd1a36a5ef8b5bc337d87.tar.gz
scala-f80801c67545a28f61abd1a36a5ef8b5bc337d87.tar.bz2
scala-f80801c67545a28f61abd1a36a5ef8b5bc337d87.zip
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.
Diffstat (limited to 'test/files/run/map_test.scala')
-rw-r--r--test/files/run/map_test.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/map_test.scala b/test/files/run/map_test.scala
index 9f83a3f49a..1ea864ed58 100644
--- a/test/files/run/map_test.scala
+++ b/test/files/run/map_test.scala
@@ -16,15 +16,15 @@ object Test extends App {
}
def test_map(myMap: Map[Int, String]) {
- val map1 = myMap.update(42,"The answer")
- val map2 = map1.update(17,"A small random number")
- val map3 = map2.update(666,"A bigger random number")
- val map4 = map3.update(4711,"A big random number")
+ val map1 = myMap.updated(42,"The answer")
+ val map2 = map1.updated(17,"A small random number")
+ val map3 = map2.updated(666,"A bigger random number")
+ val map4 = map3.updated(4711,"A big random number")
map1 == myMap + Pair(42, "The answer")
var i = 0
var map = map4
while(i < 43) {
- map = map.update(i,i.toString())
+ map = map.updated(i,i.toString())
i += 1
}
i = 0