Skip to content

Commit

Permalink
CLJS-470: fix resolve-var (.contains s ".") case
Browse files Browse the repository at this point in the history
The issue was that `defprotocol` in the core.clj macros file emits
the native type dispatch cases with `foo.-bar`, `resolve-var`
would treat this as normal var resolution which it is not - use of
the `.` in symbols without a namespace clearly represents some
kind of interop or implementation detail.

`resolve-var` no longers warns on symbols that include `.` but not
`/`.
  • Loading branch information
swannodette committed Feb 13, 2013
1 parent b47a8d7 commit e33a6ba
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/clj/cljs/analyzer.clj
Expand Up @@ -174,12 +174,9 @@
lb (-> env :locals prefix)]
(if lb
{:name (symbol (str (:name lb) suffix))}
(do
(when confirm
(confirm env prefix (symbol suffix)))
(merge (get-in @namespaces [prefix :defs (symbol suffix)])
{:name (if (= "" prefix) (symbol suffix) (symbol (str prefix) suffix))
:ns prefix}))))
(merge (get-in @namespaces [prefix :defs (symbol suffix)])
{:name (if (= "" prefix) (symbol suffix) (symbol (str prefix) suffix))
:ns prefix})))

(get-in @namespaces [(-> env :ns :name) :uses sym])
(let [full-ns (get-in @namespaces [(-> env :ns :name) :uses sym])]
Expand Down

0 comments on commit e33a6ba

Please sign in to comment.