Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* src/clj/cljs/compiler.clj: CLJS-315: resolve-var and resolve-existi…

…ng-var should never emit :name as string
  • Loading branch information...
commit f30cd5e4e9ae32de8d510012394789b9fb1868c3 1 parent b71fff2
David Nolen authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/clj/cljs/compiler.clj
View
10 src/clj/cljs/compiler.clj
@@ -108,7 +108,7 @@
(defn resolve-existing-var [env sym]
(if (= (namespace sym) "js")
- {:name (name sym) :ns 'js}
+ {:name sym :ns 'js}
(let [s (str sym)
lb (-> env :locals sym)]
(cond
@@ -154,7 +154,7 @@
(defn resolve-var [env sym]
(if (= (namespace sym) "js")
- {:name (name sym)}
+ {:name sym}
(let [s (str sym)
lb (-> env :locals sym)]
(cond
@@ -343,7 +343,11 @@
(defmethod emit :var
[{:keys [info env] :as arg}]
- (emit-wrap env (emits (munge (:name info)))))
+ (let [n (:name info)
+ n (if (= (namespace n) "js")
+ (name n)
+ n)]
+ (emit-wrap env (emits (munge n)))))
(defmethod emit :meta
[{:keys [expr meta env]}]
Please sign in to comment.
Something went wrong with that request. Please try again.