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. --- test/files/neg/bug1181.check | 2 +- test/files/neg/bug1181.scala | 2 +- test/files/run/map_test.scala | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'test/files') diff --git a/test/files/neg/bug1181.check b/test/files/neg/bug1181.check index 38045eda87..a196a702ab 100644 --- a/test/files/neg/bug1181.check +++ b/test/files/neg/bug1181.check @@ -1,4 +1,4 @@ bug1181.scala:9: error: missing parameter type - _ => buildMap(map.update(keyList.head, valueList.head), keyList.tail, valueList.tail) + _ => buildMap(map.updated(keyList.head, valueList.head), keyList.tail, valueList.tail) ^ one error found diff --git a/test/files/neg/bug1181.scala b/test/files/neg/bug1181.scala index fbbb2a84d4..5e5fceacc8 100644 --- a/test/files/neg/bug1181.scala +++ b/test/files/neg/bug1181.scala @@ -6,7 +6,7 @@ class CompilerTest(val valueList: List[Symbol]) { def buildMap(map: Map[Symbol, Symbol], keyList: List[Symbol], valueList: List[Symbol]): Map[Symbol, Symbol] = { (keyList, valueList) match { case (Nil, Nil) => map - _ => buildMap(map.update(keyList.head, valueList.head), keyList.tail, valueList.tail) + _ => buildMap(map.updated(keyList.head, valueList.head), keyList.tail, valueList.tail) } } } 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 -- cgit v1.2.3