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
Babashka produces a misleading error message for the code below. In the code an invalid number of args is passed to the "pred" function (it's supposed to be a binary predicate for condp), but babashka says the problem is with the "myfn" call instead. Ideally babashka should point to the condp call and name the "pred" function.
Code:
(defn pred [x]
(= x 5))
(defn myfn [a]
(condp pred a
1 :a
:b))
(myfn 1)
Error produced:
----- Error --------------------------------------------------------------------
Type: clojure.lang.ArityException
Message: Wrong number of args (2) passed to: user/myfn
Location: /home/jan/bug.bb:9:1
----- Context ------------------------------------------------------------------
5: (condp pred a
6: 1 :a
7: :b))
8:
9: (myfn 1)
^--- Wrong number of args (2) passed to: user/myfn
----- Stack trace --------------------------------------------------------------
user/myfn - /home/jan/bug.bb:4:1
user - /home/jan/bug.bb:9:1
The text was updated successfully, but these errors were encountered:
Tested with v1.1.173
Babashka produces a misleading error message for the code below. In the code an invalid number of args is passed to the "pred" function (it's supposed to be a binary predicate for condp), but babashka says the problem is with the "myfn" call instead. Ideally babashka should point to the condp call and name the "pred" function.
Code:
Error produced:
The text was updated successfully, but these errors were encountered: