On Fri, Sep 9, 2011 at 4:47 AM, Christina Conway <ccon...@annadaletech.com> wrote: > A function name contains the characters -> > e.g. foo->fn > The function causes an exception. > However the exception is not reported on the function but on another > function called before it. > java.lang.IllegalArgumentException: Wrong number of args (1) passed > to: datetime$other-fn > > If the > character is removed from the function name > e.g. foo-fn > then the same exception is thrown but on the function itself: > java.lang.IllegalArgumentException: Wrong number of args (1) passed > to: datetime$foo-fn > > If the - character is removed from the function name > e.g. foo>fn > then the exception is thrown on the function as follows: > java.lang.IllegalArgumentException: Wrong number of args (1) passed > to: datetime$foo-GT-fn > > The foo->fn function is compiled to a .class file as: > foo__GT_fn.class > The foo>fn function is compiled to a .class file as: > foo_GT_fn.class > The foo-fn function is compiled to a .class file as: > foo_fn.class > > Has anybody else encountered this with function names containing ->. > Is this a bug?
I was unable to reproduce the problem: user=> (defn foo->fn [] (throw (Exception. "bad thing"))) #'user/foo->fn user=> (defn other-fn [] (foo->fn)) #'user/other-fn user=> (other-fn) Exception bad thing user/foo->fn (NO_SOURCE_FILE:1) Perhaps you can post a minimal example that demonstrates the problem. Also, what version of Clojure are you using? --Chouser -- 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