Skip to content

Commit

Permalink
CLJS-1733: Macro inference issue for macros & runtime vars with the s…
Browse files Browse the repository at this point in the history
…ame name

:rename pass must also check that found renames may also be macros
  • Loading branch information
dnolen committed Aug 12, 2016
1 parent b49c198 commit d77bc71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/clojure/cljs/analyzer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1824,11 +1824,15 @@
(defn check-rename-macros-inferring-missing
[{:keys [name renames] :as ast} env]
(let [missing-renames (when (and *analyze-deps* (seq renames))
(missing-renames (:renames ast) env))
(missing-renames renames env))
maybe-macros (apply dissoc renames (keys missing-renames))
missing-rename-macros (inferred-rename-macros missing-renames env)
remove-missing-renames #(apply dissoc % (keys missing-renames))
ast' (-> ast
(update-in [:rename-macros] merge missing-rename-macros)
(update-in [:rename-macros]
#(-> %
(merge missing-rename-macros)
(merge (inferred-rename-macros maybe-macros env))))
(update-in [:renames] remove-missing-renames))]
(swap! env/*compiler*
#(-> %
Expand Down

0 comments on commit d77bc71

Please sign in to comment.