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

0 votes
in core.typed by
(from https://groups.google.com/d/msg/clojure-core-typed/4z_7WnqZsyI/53jlUHQfWhEJ)

The following code:


(t/ann new-ar (t/All [[m :< (t/Map t/Any t/Any)]] [m -> (t/Assoc m ':id Number ':version Number)]))
(defn new-ar
  [detail]
  {:post [(not (nil? (:id %)))
          (zero? (:version %))]}
  (assoc detail :id 10 :version 0))


gives the following error:


Type Error (qfi/health/core/domain/model/common.clj:40:3) Cannot assoc args `[(clojure.core.typed/Val :id) {:then tt, :else ff}] [(clojure.core.typed/Val 10) {:then tt, :else ff}] [(clojure.core.typed/Val :version) {:then tt, :else ff}] [(clojure.core.typed/Val 0) {:then tt, :else ff}]` on m
in: (assoc detail :id 10 :version 0)

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CTYP-204 (reported by alex+import)
...