Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
At times, as the artifact of repl experimentation or a refactoring in progress, one wants to eval a threaded form with 1 or (less likely) 0 arguments.
(-> 42) ; fine
(->> 42) ; throws "ArityException Wrong number of args (1) passed to: core$-GT".
(->) ; throws "ArityException Wrong number of args (0) passed to: core$" (sic)
(->>) ; throws "ArityException Wrong number of args (0) passed to: core$-GT".
Apologies for the text rendering (how to cite code?).
The issue of a poor error message with 0-arity threading macros is improved by the patch attached to ticket CLJ-1083, and adding handling of the 1-arity case is improved by the patch attached to ticket CLJ-1121.