diff --git a/src/main/clojure/cljs/analyzer.cljc b/src/main/clojure/cljs/analyzer.cljc index 47bb73dc4..3b88875b7 100644 --- a/src/main/clojure/cljs/analyzer.cljc +++ b/src/main/clojure/cljs/analyzer.cljc @@ -1880,7 +1880,11 @@ (assoc locals e {:name e :line (get-line e env) - :column (get-col e env)}) + :column (get-col e env) + ;; :local is required for {:op :local ...} nodes + ;; but previously we had no way to figure this out + ;; by adding it here we can recover it later + :local :catch}) locals) catch (when cblock (disallowing-recur (analyze (assoc catchenv :locals locals) cblock))) diff --git a/src/test/clojure/cljs/analyzer/spec_tests.clj b/src/test/clojure/cljs/analyzer/spec_tests.clj index 4ea5f8d91..48f3930bf 100644 --- a/src/test/clojure/cljs/analyzer/spec_tests.clj +++ b/src/test/clojure/cljs/analyzer/spec_tests.clj @@ -249,7 +249,7 @@ (is (= :throw (:op node))) (is (s/valid? ::a/node node)))) -#_(deftest test-try +(deftest test-try (let [node (no-warn (analyze ns-env '(try 1 (catch :default e) (finally))))] (is (= :try (:op node))) (is (s/valid? ::a/node node))))