The message is produced in AFn.throwArity:

https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/AFn.java#L434

It looks like any name that contains a hyphen followed by a "special character" 
(w.r.t. allowable chars in Java classnames) will result in a munged (i.e. 
Compiler.munge()'ed) name containing a double-underscore sequence that is 
assumed by throwArity to be a system-generated suffix.

This is perhaps another case where pushing var metadata (or some subset 
thereof) down to the function being defined in defns would be beneficial; 
AFunction could then override throwArity to just use the :name of the function 
being called, thus avoiding any confusion introduced by munged or un-munging 
names.

None of the above is related to nREPL.

- Chas

On Oct 9, 2012, at 9:10 AM, Jay Fields wrote:

> I noticed something similar, but I'm using 1.3. Maybe it's a bug in nrepl?
> 
> On Tue, Oct 9, 2012 at 6:39 AM, Alex Nixon <a...@swiftkey.net> wrote:
>> Hey all,
>> 
>> I believe I've come across a minor bug in Clojure 1.4.0 (and I see the same
>> behaviour in 1.5.0-alpha5):
>> 
>> user=> (defn a->b [])
>> #'user/a->b
>> user=> (a->b 1)
>> ArityException Wrong number of args (1) passed to: user$a
>> clojure.lang.AFn.throwArity (AFn.java:437)
>> 
>> Note that the reported function name in the stack trace is "user$a", where
>> it should be "user$a->b" (or some mangled variant thereof?)
>> 
>> Cheers,
>> --
>> Alex Nixon
>> 
>> Software Engineer | SwiftKey
>> 
>> a...@swiftkey.net | http://www.swiftkey.net/
>> 
>> ++++++
>> WINNER - MOST INNOVATIVE MOBILE APP - GSMA GLOBAL MOBILE AWARDS 2012
>> 
>> Head office: 91-95 Southwark Bridge Road, London, SE1 0AX TouchType is a
>> limited company registered in England and Wales, number 06671487. Registered
>> office: 21 Lawn Terrace, Blackheath, London, SE3 9LL, United Kingdom.
>> 
>> --
>> 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 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 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

Reply via email to