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

Cannot report error when multi-spec is combined with another spec via and #24

Closed
bhb opened this issue Sep 1, 2017 · 0 comments
Closed
Labels

Comments

@bhb
Copy link
Owner

bhb commented Sep 1, 2017

(defmulti fruit :fruit/type)
(defmethod fruit :orange [_]
  (s/keys))
(defmethod fruit :apple [_]
  (s/keys))


(s/def ::fruit1 (s/multi-spec fruit :fruit/type))
(expound/expound ::fruit1 {}) ;; works

(s/def ::fruit2 (s/and
                 map?
                 (s/multi-spec fruit :fruit/type)))
(expound/expound ::fruit2 {:fruit/type :orange}) ;; works
(expound/expound ::fruit2 {:fruit/type :banana}) ;; error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant