Skip to content

Commit

Permalink
macro inference also needs to check if uses that exist are *also* mac…
Browse files Browse the repository at this point in the history
…ros, partial solution to CLJS-1733
  • Loading branch information
dnolen committed Aug 12, 2016
1 parent d197bcb commit b49c198
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/clojure/cljs/analyzer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1805,12 +1805,15 @@

(defn check-use-macros-inferring-missing
[{:keys [name uses use-macros] :as ast} env]
(let [missing-uses (when (and *analyze-deps* (seq uses))
(missing-uses uses env))
(let [missing-uses (when (and *analyze-deps* (seq uses))
(missing-uses uses env))
maybe-macros (apply dissoc uses (keys missing-uses))
remove-missing-uses #(apply dissoc % (keys missing-uses))
ast' (-> ast
(update-in [:use-macros] merge
(check-use-macros use-macros missing-uses env))
(update-in [:use-macros]
#(-> %
(merge (check-use-macros use-macros missing-uses env))
(merge (inferred-use-macros maybe-macros env))))
(update-in [:uses] remove-missing-uses))]
(swap! env/*compiler*
#(-> %
Expand Down

0 comments on commit b49c198

Please sign in to comment.