Permalink
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...
1 parent b71fff2 commit f30cd5e4e9ae32de8d510012394789b9fb1868c3 David Nolen committed Jun 14, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/clj/cljs/compiler.clj
View
@@ -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]}]

0 comments on commit f30cd5e

Please sign in to comment.