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

0 votes
in Spec by
Specs relying on every-impl (such as every, coll-of, etc) may break when passed a record. For example:

{code:title=REPL Session|borderStyle=solid}
> (require ['clojure.spec.alpha :as 's])

> (s/def ::coll-any (s/coll-of any?))
> (defrecord Pair [first second])

> (s/valid? ::coll-any 3)
false

> (s/valid? ::coll-any {:a 1 :b 2}
true

> (s/valid? ::coll-any (Pair. 1 2))
Execution error (UnsupportedOperationException) at user.Pair/empty (REPL:1).
Can't create empty: user.Pair

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2481 (reported by alex+import)
...