You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ clj
user=> (defn foo [a b] (prn a b))
#'user/foo
user=> (apply foo [1 2 3])
Execution error (ArityException) at user/eval7940 (REPL:1).
Wrong number of args (3) passed to: user/foo
$ bb
*user=> (defn foo [a b] (prn a b))
#'user/foo
*user=> (apply foo [1 2 3] )
clojure.lang.ArityException: Wrong number of args (3) passed to: clojure.core/apply [at <repl>:2:1]
Cnly
changed the title
Wrong error message when using reduce with certain reducing functions
Wrong arity error messages for certain functions (apply, reduce)
Dec 18, 2021
version
This is with babashka 0.7.0 so should be https://github.com/babashka/sci/tree/573ee0e2f2ecdfc30f9f4b0d306626cacd6d3f06.
platform
Mac, binary
problem
Reducing functions lacking implementations for arities other than 2 can cause bb to give the wrong error message when used with
clojure.core/reduce
.repro
Result:
clojure.lang.ArityException: Wrong number of args (0) passed to: clojure.core/reduce [at <repl>:5:3]
expected behavior
Correct error message given by clojure:
Wrong number of args (0) passed to: user/rf
The text was updated successfully, but these errors were encountered: