summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/ListMap.scala
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2010-11-19 12:38:06 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2010-11-19 12:38:06 +0000
commitfcbf3715187470c8568057bebb7f9577f6163e88 (patch)
treea971e1c7fdf41c6f867be36157d658c3f686576f /src/library/scala/collection/immutable/ListMap.scala
parent1ab5e1578c600e7fe415998fa3f13afed7d7fb14 (diff)
downloadscala-fcbf3715187470c8568057bebb7f9577f6163e88.tar.gz
scala-fcbf3715187470c8568057bebb7f9577f6163e88.tar.bz2
scala-fcbf3715187470c8568057bebb7f9577f6163e88.zip
Fixes #3935.
No review.
Diffstat (limited to 'src/library/scala/collection/immutable/ListMap.scala')
-rw-r--r--src/library/scala/collection/immutable/ListMap.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/ListMap.scala b/src/library/scala/collection/immutable/ListMap.scala
index 28d2f637db..53c99216c2 100644
--- a/src/library/scala/collection/immutable/ListMap.scala
+++ b/src/library/scala/collection/immutable/ListMap.scala
@@ -192,7 +192,7 @@ class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] {
// if (tail eq next) this
// else new tail.Node(key, value)
// }
- // we use an imperative one instead:
+ // we use an imperative one instead (and use an auxiliary list to preserve order!):
var cur: ListMap[A, B1] = this
var lst: List[(A, B1)] = Nil
while (cur.nonEmpty) {