EventType/NAVIGATE is not supported. There's no truly consistent way to
differentiate "static fields" from namespaces. In ClojureScript / always
indicates a namespace - nothing else. Use EventType.NAVIGATE instead.


On Wed, Apr 16, 2014 at 4:35 PM, Timothy Pratley
<[email protected]>wrote:

> Hi,
>
>
> Clojurescript is currently producing incorrect warnings for code like this:
>
> (ns x
>   (:import goog.History.EventType))
> (something something EventType/NAVIGATE)
>
> Perhaps I broke this in
> http://dev.clojure.org/jira/browse/CLJS-615
>
> There is a very simple fix (see below).  Please let me know if this is a
> patch welcome ticket-able item.
>
>
> Regards,
> Timothy
>
>
> diff --git a/src/clj/cljs/analyzer.clj b/src/clj/cljs/analyzer.clj
> index d4cc557..8086deb 100644
> --- a/src/clj/cljs/analyzer.clj
> +++ b/src/clj/cljs/analyzer.clj
> @@ -291,6 +291,7 @@
>  (defn confirm-ns [env ns-sym]
>    (when (and (nil? (get '#{cljs.core goog Math goog.string} ns-sym))
>               (nil? (get (-> env :ns :requires) ns-sym))
> +             (nil? (get (-> env :ns :import-nss) ns-sym))
>               ;; macros may refer to namespaces never explicitly required
>               ;; confirm that the library at least exists
>               (nil? (io/resource (ns->relpath ns-sym))))
> @@ -1145,7 +1146,8 @@
>        :requires requires
>        :use-macros use-macros
>        :require-macros require-macros
> -      :imports imports)
> +      :imports imports
> +      :import-nss (set (vals imports)))
>      {:env env :op :ns :form form :name name :doc docstring :uses uses
> :requires requires :imports imports
>       :use-macros use-macros :require-macros require-macros :excludes
> excludes}))
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to