summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Grand <christophe@cgrand.net>2009-08-11 01:51:04 +0200
committerRich Hickey <richhickey@gmail.com>2009-08-26 12:02:57 -0400
commit6361bfb9365b98670beb429162b626c11c78d5e7 (patch)
treef84897ab2973963f2d4241792d055213d57a6362 /src
parenteedcf35479737ab1136e3b8a00b2759190a73fdb (diff)
fixed assoc on collision
Signed-off-by: Rich Hickey <richhickey@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/jvm/clojure/lang/PersistentHashMap.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jvm/clojure/lang/PersistentHashMap.java b/src/jvm/clojure/lang/PersistentHashMap.java
index 101a6df9..ace923f3 100644
--- a/src/jvm/clojure/lang/PersistentHashMap.java
+++ b/src/jvm/clojure/lang/PersistentHashMap.java
@@ -747,7 +747,7 @@ final static class HashCollisionNode implements INode{
return new HashCollisionNode(edit, hash, count + 1, newArray);
}
// nest it in a bitmap node
- return new BitmapIndexedNode(null, bitpos(this.hash, shift), new Object[] {this})
+ return new BitmapIndexedNode(null, bitpos(this.hash, shift), new Object[] {null, this})
.assoc(shift, hash, key, val, addedLeaf);
}
@@ -839,7 +839,7 @@ final static class HashCollisionNode implements INode{
return ensureEditable(edit, count + 1, newArray);
}
// nest it in a bitmap node
- return new BitmapIndexedNode(edit, bitpos(this.hash, shift), new Object[] {this})
+ return new BitmapIndexedNode(edit, bitpos(this.hash, shift), new Object[] {null, this})
.assoc(edit, shift, hash, key, val, addedLeaf);
}