From 1029c060f7c1f83d32cc995bf32e6a0eb8ff9b94 Mon Sep 17 00:00:00 2001 From: Brandon Bloom Date: Thu, 6 Dec 2012 13:10:20 -0800 Subject: [PATCH] CLJS-437: Validate arity of 'if forms --- src/clj/cljs/analyzer.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/clj/cljs/analyzer.clj b/src/clj/cljs/analyzer.clj index b179fbd..ec9cb4a 100644 --- a/src/clj/cljs/analyzer.clj +++ b/src/clj/cljs/analyzer.clj @@ -235,6 +235,7 @@ (defmethod parse 'if [op env [_ test then else :as form] name] + (assert (>= (count form) 3) "Too few arguments to if") (let [test-expr (disallowing-recur (analyze (assoc env :context :expr) test)) then-expr (analyze env then) else-expr (analyze env else)] -- 1.8.0