Completed
Details
Assignee
UnassignedUnassignedReporter
Nicola MomettoNicola MomettoLabels
Approval
OkPatch
CodePriority
MajorAffects versions
Fix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Nicola Mometto
Nicola MomettoLabels
Approval
Ok
Patch
Code
Priority

Affects versions
Fix versions
Created February 16, 2017 at 11:34 PM
Updated March 14, 2017 at 11:57 AM
Resolved March 14, 2017 at 11:57 AM
Reported by @UNKNOWN_USER in #clojure-spec:
user> (s/conform :clojure.core.specs/defn-args '(foo [bar] {:baz 42})) {:name foo, :bs [:arity-1 {:args {:args [[:sym bar]]}, :prepost {:baz 42}}]}
The current spec conforms function bodies with single maps as prepost conditions rather than function bodies, after the patch:
user=> (s/conform :clojure.core.specs/defn-args '(foo [bar] {:baz 42})) {:name foo, :bs [:arity-1 {:args {:args [[:sym bar]]}, :body [:body [{:baz 42}]]}]} user=> (s/conform :clojure.core.specs/defn-args '(foo [bar] {:baz 42} 1)) {:name foo, :bs [:arity-1 {:args {:args [[:sym bar]]}, :body [:prepost+body {:prepost {:baz 42}, :body [1]}]}]}
Patch: 0001-CLJ-2144-conform-map-fn-bodies-as-body-rather-than-a.patch
Screened by: Alex Miller