If you look at the class of the created map you’ll notice that it is in fact scala.collection.immutable.Map$Map2 in this case. This is because immutable maps of 0, 1, 2, 3 and 4 elements all have their own special implementation. As for the output stating it as scala.collection.immutable.Map[Int,Int], this is caused by Map2 inheriting scala.collection.Map.stringPrefix (which sets it to Map).