Aladdin - Scala Bugtracking
[#926] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Gilles Gilles fixed 2007-01-30 13:40:02.0
subject ListMap does not keep element order
code
object Test extends Application {
  import scala.collection.immutable.ListMap
  var lm: Map[Int, Int] = new ListMap[Int, Int]()
  lm = lm + {5,5}
  lm = lm + {6,6}
  for (val l <- lm.elements) {
    Console.println(l)
  }
}
what happened
{6,6}
{5,5}
what expected
{5,5}
{6,6}

This used to work in 2.3.1

[back to overview]
Changes of this bug report
Martin  edited on  2007-02-01 17:07:55.0
Gilles  edited on  2007-05-10 16:42:31.0
Fixed a long time ago, it seems.