diff options
author | Stuart Halloway <stu@thinkrelevance.com> | 2010-07-14 13:41:16 -0400 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2010-07-27 16:50:45 -0400 |
commit | ec2037e5d93b6634d890d0a1266481aa224932d0 (patch) | |
tree | 4f6190bb5e021f4e475f8a299e852f653403f0d3 /src | |
parent | 1f6834c3d8cf001c6bb4d52ab4221855989d7e8a (diff) |
fix degenerate defrecords, #402
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/clj/clojure/core_deftype.clj | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clj/clojure/core_deftype.clj b/src/clj/clojure/core_deftype.clj index b0604c9e..3b531f05 100644 --- a/src/clj/clojure/core_deftype.clj +++ b/src/clj/clojure/core_deftype.clj @@ -195,8 +195,8 @@ `(entryAt [this# k#] (let [v# (.valAt this# k# this#)] (when-not (identical? this# v#) (clojure.lang.MapEntry. k# v#)))) - `(seq [this#] (concat [~@(map #(list `new `clojure.lang.MapEntry (keyword %) %) base-fields)] - ~'__extmap)) + `(seq [this#] (seq (concat [~@(map #(list `new `clojure.lang.MapEntry (keyword %) %) base-fields)] + ~'__extmap))) `(assoc [this# k# ~gs] (condp identical? k# ~@(mapcat (fn [fld] @@ -212,7 +212,7 @@ (conj m `(size [this#] (.count this#)) `(isEmpty [this#] (= 0 (.count this#))) - `(containsValue [this# v#] (-> this# vals (.contains v#))) + `(containsValue [this# v#] (boolean (some #{v#} (vals this#)))) `(get [this# k#] (.valAt this# k#)) `(put [this# k# v#] (throw (UnsupportedOperationException.))) `(remove [this# k#] (throw (UnsupportedOperationException.))) |