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

0 votes
in Spec by
Minimal failing case:


(s/def ::key-spec (s/or :kw keyword? :str string?))
(s/def ::map-spec (s/map-of ::key-spec identity))
(println (s/unform ::map-spec (s/conform ::map-spec {:a :b})))


java.lang.UnsupportedOperationException: nth not supported on this type: Keyword

If keys are not conformed, we should also not attempt to unform them.

5 Answers

0 votes
by

Comment made by: danielstockton

Add test and fix behaviour

0 votes
by

Comment made by: danielstockton

Actually, although this passes all tests, it's not alright because it bypasses validation.

0 votes
by

Comment made by: danielstockton

I think it passes for correctness this time but open to advice if this is not a good approach.

0 votes
by

Comment made by: alex+import

Add patch lost in jira migration.

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