We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2c268a commit 00e9d46Copy full SHA for 00e9d46
1 file changed
src/main/clojure/clojure/tools/analyzer/passes/add_binding_atom.clj
@@ -24,6 +24,10 @@
24
(swap! state assoc (:name ast) a)
25
(assoc ast :atom a))
26
:local
27
- (assoc ast :atom (or (@state (:name ast))
28
- (atom {})))
+ (if-let [a (@state (:name ast))]
+ (assoc ast :atom a)
29
+ ;; handle injected locals
30
+ (let [a (get-in ast [:env :locals (:name ast) :atom] (atom {}))]
31
+ (swap! state assoc (:name ast) a)
32
+ (assoc ast :atom a)))
33
ast)))
0 commit comments