I am using Clojure 1.10.0 Basic example for the issue is:
(let [x 42] :clojure.spec.alpha/invalid) This will result in the following exception: 2. Unhandled clojure.lang.Compiler$CompilerException 1. Caused by clojure.lang.ExceptionInfo Call to clojure.core/let did not conform to spec. #:clojure.spec.alpha{:problems [{:path [:body], :pred clojure.core/any?, :val :clojure.spec.alpha/invalid, :via [], :in [1]}], :spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x3358b4c5 "clojure.spec.alpha$regex_spec_impl$reify__2509@3358b4c5"], :value ([x 42] :clojure.spec.alpha/invalid), :args ([x 42] :clojure.spec.alpha/invalid)} Couple of workarounds I've been told: (let [x 42] (identity :clojure.spec.alpha/invalid)) (def invalid :clojure.spec.alpha/invalid)) (let [x 42] invalid) Also, interestingly the error is only with the let macro (and some others in clojure.core), special forms (like if) are seemingly unaffected: (let [x 42] (if (= 42 x) :clojure.spec.alpha/invalid)) Therefore I assume this is unintended, is a bug, and hopefully be fixed in the future. Regards, Daniel -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/89f231b3-b5e3-402f-a3dd-bf59598048b3%40googlegroups.com.