Skip to content

Commit

Permalink
Cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
fogus committed Mar 4, 2013
1 parent 18c2ec8 commit 76f11bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/clojure/clojure/core/contracts/constraints.clj
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@

(defmacro defconstrainedrecord
[name slots inv-description invariants & etc]
(let [fields (vec slots)
(let [fields (vec slots)
ns-part (namespace-munge *ns*)
classname (symbol (str ns-part "." name))
ctor-name (symbol (str name \.))
Expand Down Expand Up @@ -171,7 +171,8 @@
(if-let [contract (and m (-> m meta :contract))]
((partial contract identity) (apply f m args))
(apply f m args)))
{:hooked true})))
{:hooked true
:original f})))

(when *assert*
(alter-var-root (var assoc) apply-contract)
Expand Down

0 comments on commit 76f11bd

Please sign in to comment.