title: Is this surprising (to me) difference in Map's behaviour in Scala 2.8.0 and 2.7.7 expected?
body: <p>It looks like -- in Scala 2.8.0 -- if you map() a Map instance to a sequence of 2-tuples that you end up getting a Map back.  When this happens, any of the 2-tuples with the same first element are considered duplicates, and you only end up getting the last one.  This is different from what happened in 2.7.7.  This is easier to understand with an example.</p>
  
  <p>Scala 2.7.7:</p>
  
  <pre><code>scala&gt; val m = Map("a" -&gt; 1, "b" -&gt; 2, "c" -&gt; 3)
  m: scala.collection.immutable.Map[java.lang.String,Int] = Map(a -&gt; 1, b -&gt; 2, c -&gt; 3)
  
  scala&gt; m.map { case (k, v) =&gt; ("foo", v) }
  res5: Iterable[(java.lang.String, Int)] = ArrayBuffer((foo,1), (foo,2), (foo,3))
  </code></pre>
  
  <p>Scala 2.8.0:</p>
  
  <pre><code>scala&gt; val m = Map("a" -&gt; 1, "b" -&gt; 2, "c" -&gt; 3)
  m: scala.collection.immutable.Map[java.lang.String,Int] = Map((a,1), (b,2), (c,3))
  
  scala&gt; m.map { case (k, v) =&gt; ("foo", v) }
  res16: scala.collection.immutable.Map[java.lang.String,Int] = Map((foo,3))
  </code></pre>
  
  <p>Is this expected?  Is the change documented somewhere?  It seems like a reasonable idea, but it has cost me a lot of time upgrading a 2.7.7 app that was relying on the old behaviour.</p>
  
  <p><strong>Update:</strong> </p>
  
  <p>As pointed out below by Kris Nuttycombe, reading <a href="http://www.scala-lang.org/docu/files/collections-api/collections_47.html" rel="nofollow">Migrating from Scala 2.7</a> might have been a good start before asking this question :)  In particular it mentions using the compiler flag <code>-Xmigration</code>, which seems extremely useful when porting.</p>