Hi all,

Was wondering if anyone might be familiar with the reason for some unexpected 
behaviour I'm seeing?

(extend-type js/jQuery
  ILookup
  (-lookup
    ([this k] nil)
    ([this k not-found] nil))
  IFn
  (-invoke
    ([this k] (-lookup this k))
    ([this k not-found] (-lookup this k not-found))))

This works fine against ClojureScript <= 1.8.40, but against >= 1.8.51 (up to 
1.9.293) triggers:
`WARNING: Use of undeclared Var taoensso.lib.web/jQuery`.

I'll note a peculiarity: it's specifically the `-lookup` call that triggers the 
compilation warning. Avoiding that call and extending to other protocols like 
ICounted, etc. work as usual.

For example, the following will *not* produce a warning:

(extend-type js/jQuery
  ILookup
  (-lookup
    ([this k] nil)
    ([this k not-found] nil))
  IFn
  (-invoke
    ([this k] nil #_(-lookup this k))
    ([this k not-found] nil #_(-lookup this k not-found))))

Am I possibly missing something simple? Couldn't see any obvious explanation in 
the changelog at 
https://groups.google.com/forum/#!topic/clojurescript/fR1PVRXtzCI

Thanks, cheers!

-- 
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 https://groups.google.com/group/clojurescript.

Reply via email to