From d6440795c22e46d2a2f8ab585fb6cfabf62cc147 Mon Sep 17 00:00:00 2001 From: dnolen Date: Wed, 1 Jun 2016 13:39:37 -0400 Subject: [PATCH] macro checking support --- src/main/clojure/cljs/analyzer.cljc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/clojure/cljs/analyzer.cljc b/src/main/clojure/cljs/analyzer.cljc index 42101ca7eb..b80e84384c 100644 --- a/src/main/clojure/cljs/analyzer.cljc +++ b/src/main/clojure/cljs/analyzer.cljc @@ -2361,7 +2361,11 @@ (if-not (nil? mac-var) (#?@(:clj [binding [*ns* (create-ns *cljs-ns*)]] :cljs [do]) - (let [form' (try + (let [mchk #?(:clj (some-> (find-ns 'clojure.spec) + (ns-resolve 'macroexpand-check))) + _ #?(:clj (when mchk + (mchk mac-var (next form)))) + form' (try (apply @mac-var form env (rest form)) #?(:clj (catch ArityException e (throw (ArityException. (- (.actual e) 2) (.name e))))))]