`
user> (require '[clojure.spec :as s])
nil
user> (defrecord Box [a])
user.Box
user>
user> (s/conform
(s/cat :boxes (s/* #(instance? Box %))
:name (s/coll-of integer?))
[(Box. 0) [5]])
UnsupportedOperationException 无法创建空:user.Box user.Box (form-init8049111656025227309.clj:1)
user> (clojure.repl/pst *e)
UnsupportedOperationException 无法创建空:user.Box
user.Box (NO_SOURCE_FILE:2)
clojure.core/empty (core.clj:5151)
clojure.spec/every-impl/cfns--14008/fn--14014 (spec.clj:1215)
clojure.spec/every-impl/reify--14027 (spec.clj:1229)
clojure.spec/conform (spec.clj:150)
clojure.spec/dt (spec.clj:731)
clojure.spec/dt (spec.clj:727)
clojure.spec/deriv (spec.clj:1456)
clojure.spec/deriv (spec.clj:1463)
clojure.spec/deriv (spec.clj:1467)
clojure.spec/re-conform (spec.clj:1589)
clojure.spec/regex-spec-impl/reify--14267 (spec.clj:1633)
`
这是从-alpha7出现的回归;类似spec(考虑到coll-of的默认值参数)在这里按预期工作。