Skip to content

Commit 8e88387

Browse files
committed
same as Clojure 1f25347
1 parent 09c1369 commit 8e88387

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/cljs/cljs/spec.cljs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,10 @@
202202
(defn- gensub
203203
[spec overrides path rmap form]
204204
;;(prn {:spec spec :over overrides :path path :form form})
205-
(if-let [spec (specize spec)]
205+
(let [spec (specize spec)]
206206
(if-let [g (c/or (get overrides path) (gen* spec overrides path rmap))]
207207
(gen/such-that #(valid? spec %) g 100)
208-
(throw (js/Error. (str "Unable to construct gen at: " path " for: " (abbrev form)))))
209-
(throw (js/Error. (str "Unable to construct gen at: " path ", " (abbrev form) " can not be made a spec")))))
208+
(throw (js/Error. (str "Unable to construct gen at: " path " for: " (abbrev form)))))))
210209

211210
(defn gen
212211
"Given a spec, returns the generator for it, or throws if none can

0 commit comments

Comments
 (0)