Welcome! Please see the About page for a little more info on how this works.

0 votes
in Spec by

There should be ways to fail-fast on spec creation if the values are invalid. Currently, invalid specs can be created, which will fail late on calls to s/valid? etc.

`
(s/def ::a 1)

(s/valid? ::a 1)
; Syntax error (ClassCastException) compiling at ...
; java.lang.Long cannot be cast to clojure.lang.IFn

(s/valid? (s/or :a 1 :b 2) 1)
; Syntax error (ClassCastException) compiling at ...
; java.lang.Long cannot be cast to clojure.lang.IFn

`

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2515 (reported by ikitommi)
...