File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -393,8 +393,8 @@ specified, return speced vars from all namespaces."
393393
394394(defmacro instrument
395395 " Instruments the var at v, a var or symbol, to check specs
396- registered with fdef. Wraps the fn at v to check :args/:ret/:fn
397- specs , if they exist, throwing an ex-info with explain-data if a
396+ registered with fdef. Wraps the fn at v to check :args
397+ spec , if it exist, throwing an ex-info with explain-data if a
398398 check fails. Idempotent."
399399 [v]
400400 (let [v (if-not (seq? v) (list 'var v) v)
Original file line number Diff line number Diff line change 293293 (if *instrument-enabled*
294294 (s/with-instrument-disabled
295295 (let [specs (fn-spec v)]
296- (let [cargs (when (:args specs) (conform! v :args (:args specs) args args))
297- ret (binding [*instrument-enabled* true ]
298- (apply f args))
299- cret (when (:ret specs) (conform! v :ret (:ret specs) ret args))]
300- (when (c/and (:args specs) (:ret specs) (:fn specs))
301- (conform! v :fn (:fn specs) {:args cargs :ret cret} args))
302- ret)))
296+ (when (:args specs) (conform! v :args (:args specs) args args))
297+ (binding [*instrument-enabled* true ]
298+ (apply f args))))
303299 (apply f args)))
304300 (not (instance? MultiFn f)) (doto (gobj/extend f)))))
305301
You can’t perform that action at this time.
0 commit comments