Just some more, maybe even simpler examples:
Clojure 1.3.0-master-SNAPSHOT
user=> (defn foo>>bar [] "")
user=> (foo>>bar "a")
ArityException Wrong number of args (1) passed to: user$foo-GT
clojure.lang.AFn.throwArity (AFn.java:439)
user=> (defn foo++bar [a] "")
user=> (foo++bar)
ArityException
Hi,
On Monday, September 12, 2011 8:07:22 PM UTC+2, Chouser wrote:
>
>
> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/AFn.java#L436
>
looks like a subtle bug, doesn't it? The compiler translates '-' to '_'
(Compiler.java:2619) and '>' to '_GT_' (Compiler.java:2623). Toge
On Mon, Sep 12, 2011 at 11:39 AM, Sean Corfield wrote:
> On Mon, Sep 12, 2011 at 8:16 AM, Stefan Kamphausen
> wrote:
>> Maybe the example becomes clearer with a little less foo and a little more
>> bar and baz:
>>
>> shell> lein repl
>> REPL started; server listening on localhost port 64913
>> us
On Mon, Sep 12, 2011 at 8:16 AM, Stefan Kamphausen
wrote:
> Maybe the example becomes clearer with a little less foo and a little more
> bar and baz:
>
> shell> lein repl
> REPL started; server listening on localhost port 64913
> user=> (defn foo [arg] "foo")
> #'user/foo
> user=> (defn bar->baz [
Maybe the example becomes clearer with a little less foo and a little more
bar and baz:
shell> lein repl
REPL started; server listening on localhost port 64913
user=> (defn foo [arg] "foo")
#'user/foo
user=> (defn bar->baz [a b] "bar->baz")
#'user/bar->baz
user=> (foo (bar->baz "a"))
java.lang.Il
On 12 September 2011 15:49, Christina Conway wrote:
> user=> (defn foo [a] "")
> #'user/foo
> user=> (defn foo->foo2 [a b] "")
> #'user/foo->foo2
> user=> (foo (foo->foo2 "a"))
> java.lang.IllegalArgumentException: Wrong number of args (1) passed to:
> user$foo (NO_SOURCE_FILE:0)
>
> This example
user=> (defn foo [a] "")
#'user/foo
user=> (defn foo->foo2 [a b] "")
#'user/foo->foo2
user=> (foo (foo->foo2 "a"))
java.lang.IllegalArgumentException: Wrong number of args (1) passed to:
user$foo (NO_SOURCE_FILE:0)
This example illustrates the problem. The exception indicates that the foo
function
On Fri, Sep 9, 2011 at 4:47 AM, Christina Conway
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: Wro
Thanks for the suggestion BG.
I tried using clj-stacktrace but the function name is still not displayed
correctly in the trace.
Regards,
cc
On 11 September 2011 13:53, Baishampayan Ghose wrote:
> > The foo->fn function is compiled to a .class file as:
> > foo__GT_fn.class
> > The foo>fn functio
> 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 thi
I've had no problems with functions containing ->
Jonathan
On Fri, Sep 9, 2011 at 10:47 AM, Christina Conway
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
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 > charac
12 matches
Mail list logo