Skip to content

Commit 85e1dce

Browse files
author
dnolen
committed
remove identical? check on strings in get-expander-ns for ClojureScript JVM
1 parent 07c9d03 commit 85e1dce

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/main/clojure/cljs/analyzer.cljc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,16 +2265,13 @@
22652265

22662266
(defn get-expander-ns [env ^String nstr]
22672267
(cond
2268-
(identical? "clojure.core" nstr)
2269-
#?(:clj (find-ns 'cljs.core)
2270-
:cljs (find-macros-ns CLJS_CORE_MACROS_SYM))
2271-
(identical? "clojure.repl" nstr)
2272-
#?(:clj (find-ns 'cljs.repl)
2273-
:cljs (find-macros-ns 'cljs.repl))
2274-
#?@(:clj [(.contains nstr ".") (find-ns (symbol nstr))]
2275-
:cljs [(goog.string/contains nstr ".") (find-macros-ns (symbol nstr))])
2276-
:else
2277-
(some-> env :ns :require-macros (get (symbol nstr)) find-ns)))
2268+
#?@(:clj [(= "clojure.core" nstr) (find-ns 'cljs.core)]
2269+
:cljs [(identical? "clojure.core" nstr) (find-macros-ns CLJS_CORE_MACROS_SYM)])
2270+
#?@(:clj [(= "clojure.repl" nstr) (find-ns 'cljs.repl)]
2271+
:cljs [(identical? "clojure.repl" nstr) (find-macros-ns 'cljs.repl)])
2272+
#?@(:clj [(.contains nstr ".") (find-ns (symbol nstr))]
2273+
:cljs [(goog.string/contains nstr ".") (find-macros-ns (symbol nstr))])
2274+
:else (some-> env :ns :require-macros (get (symbol nstr)) find-ns)))
22782275

22792276
(defn get-expander* [sym env]
22802277
(when-not (or (not (nil? (gets env :locals sym))) ; locals hide macros

0 commit comments

Comments
 (0)