Skip to content

Commit e494046

Browse files
author
dnolen
committed
CLJS-1394: reify gensyms can clash
namespace reify names
1 parent 345de64 commit e494046

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/clojure/cljs/core.cljc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
unsafe-bit-and bit-shift-right-zero-fill mask bitpos caching-hash
4141
defcurried rfn specify! js-this this-as implements? array js-obj
4242
simple-benchmark gen-apply-to js-str es6-iterable load-file* undefined?
43-
specify copy-arguments])])
43+
specify copy-arguments goog-define])])
4444
#?(:cljs (:require-macros [cljs.core :as core]))
4545
(:require clojure.walk
4646
clojure.set
47+
[clojure.string :as string]
4748
cljs.compiler
4849
[cljs.env :as env]
4950
#?(:cljs [cljs.core :as core])
@@ -1220,7 +1221,11 @@
12201221
(meta ^{:k :v} (reify Object (toString [this] \"foo\")))
12211222
== {:k :v}"
12221223
[& impls]
1223-
(core/let [t (with-meta (gensym "t") {:anonymous true})
1224+
(core/let [t (with-meta
1225+
(gensym
1226+
(core/str "t_"
1227+
(string/replace (core/str (munge ana/*cljs-ns*)) "." "$")))
1228+
{:anonymous true})
12241229
meta-sym (gensym "meta")
12251230
this-sym (gensym "_")
12261231
locals (keys (:locals &env))

0 commit comments

Comments
 (0)