Permalink
Browse files

hardcoded f causes issue in cnstr'd records

  • Loading branch information...
1 parent 0c57cad commit 3bee3bd6bf5ec742b0a2420767de69464bd19ccb @fogus committed Jun 18, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/trammel/core.clj
View
@@ -104,12 +104,13 @@
richer assertion message.
"
[message cnstr]
- (let [[args pre-post-map] cnstr]
- `(~(into '[f] args)
+ (let [[args pre-post-map] cnstr
+ _f_ (gensym)]
+ `(~(into (vector _f_) args)
(let [ret# (try
((fn []
~(select-keys pre-post-map [:pre])
- ~(list* 'f (mapcat (fn [item]
+ ~(list* _f_ (mapcat (fn [item]
(cond (symbol? item) [item]
(map? item) [(:as item)]
:else [item]))

0 comments on commit 3bee3bd

Please sign in to comment.