Skip to content

Commit

Permalink
prioritze invokeable namespace aliases over core names
Browse files Browse the repository at this point in the history
otherwise ["foo" :as Box] with Box will yield the incorrect
cljs.core/Box since this happens to be a core name. very specific
to Box in this case but can happen to all core names.

fixes #1075
  • Loading branch information
thheller committed Dec 17, 2022
1 parent e313852 commit c75498f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/shadow/build/cljs_hacks.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@
:name cljs.core/Object
:ns cljs.core}

(invokeable-ns? sym env)
(resolve-invokeable-ns sym current-ns env)

(ana/core-name? env sym)
(do (when (some? confirm)
(confirm env 'cljs.core sym))
(resolve-cljs-var 'cljs.core sym))

(invokeable-ns? sym env)
(resolve-invokeable-ns sym current-ns env)

;; short circuit for direct references to a fully qualify closure name eg. goog.math.Integer
;; will end up here for anything import such as (:import [goog.module ModuleLoader])

Expand Down

0 comments on commit c75498f

Please sign in to comment.