If you use 2.7, this is due to the fact that over time the collection library has become incompatible with a different implementation class that does not specialize in the return types of some methods. This is one of the things that has been fixed in the redesign of the collection library for 2.8.
If you are using 2.8, this is because the update method is deprecated and you should use updated instead. This sets the return value correctly.
scala> HashMap(1->1, 2->2, 3->3, 4->4).updated(1,3) res4: scala.collection.immutable.HashMap[Int,Int] = Map((2,2), (4,4), (1,3), (3,3))
source share