Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong number of args (3) passed to malli.core/-fail! #536

Closed
lucywang000 opened this issue Aug 31, 2021 · 5 comments
Closed

Wrong number of args (3) passed to malli.core/-fail! #536

lucywang000 opened this issue Aug 31, 2021 · 5 comments

Comments

@lucywang000
Copy link
Contributor

The -fail! function accepts 1 or 2 args, but here apparently it gets 3 (2 plus one inserted by the cond-> macro)

------ WARNING #1 - :fn-arity --------------------------------------------------
 Resource: malli/core.cljc:2007:43
--------------------------------------------------------------------------------
2004 |    (function-schema ?schema nil))
2005 |   ([?schema options]
2006 |    (let [s (schema ?schema options), t (type s)]
2007 |      (cond-> s (not (#{:=> :function} t)) (-fail! :invalid-=>schema {:type t, :schema s})))))
-------------------------------------------------^------------------------------
 Wrong number of args (3) passed to malli.core/-fail!
--------------------------------------------------------------------------------
@ikitommi
Copy link
Member

This is fixed in master

@lucywang000
Copy link
Contributor Author

Ah you're right. Sorry for the noise

@ikitommi
Copy link
Member

noprob.

@solatis
Copy link
Contributor

solatis commented Sep 19, 2021

Could this potentially be cherry-picked and released as 0.6.2? It seems like this code path is currently broken in 0.6.1, and 0.7.0 is not yet released.

@ikitommi
Copy link
Member

0.6.2 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants