ClSymbol is a Java class. I don't get the replacement warning because I've excluded that symbol explicitly in my ns declaration using :refer-clojure :exclude.
I haven't done a 'lein clean' because I'm not using lein, but I have rebuilt various times. However, sometimes it will work and sometimes it won't. I just tried this now, and I've been unable to reproduce. I guess I'll keep working tomorrow and see if it crops up again. If I see it again I'm going to try ((var-get #'symbol?) 2) to see if the results from the function differ from the macroexpanded version. On 20 June 2013 22:21, Jim - FooBar(); <jimpil1...@gmail.com> wrote: > On 20/06/13 10:59, Colin Fleming wrote: > >> Because this tests for something different - that the element is an >> instance of ClSymbol. It's not testing the same thing as the core version. >> I qualify it (psi/symbol? in the examples above) to distinguish it from the >> core one. >> >> Basically, I'm trying to use definline to allow me to have a more >> Clojure-y API without having the performance hit of tons of tiny function >> calls. >> >> I agree that this is unlikely to be a bug in Clojure and is probably >> something I'm missing, but I can't figure it out. >> > > right I see...so if ClSymbol is a defrecord/deftype I don't see anything > wrong with your code...when you do (in-ns 'plugin.psi) do you get a warning > that core/symbol? is being replaced by psi/symbol? ? > > what you tried on your repl works fine on mine: > > user=> (defrecord FOO [a]) > user.FOO > > user=> (definline foo? [e] > #_=> `(instance? FOO ~e)) > #'user/foo? > > user=> (foo? 2) > false > > user=> (filter foo? [1 2 3]) > () > > user=> (filter foo? [(FOO. 1) 2 3]) > (#user.FOO{:a 1}) > > Did you try 'lein clean' to get rid of already compiled classes? I'm > suspecting you have different versions of the same class lying around > because of what you said about compiling and recompiling... > > Jim > > > > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en> > --- You received this message because you are subscribed to the Google > Groups "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > clojure+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > . > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.