(:require [clojure.core.typed :refer :all]
[clojure.string :as s]))
(cf (ann core.string/blank? [String -> Boolean]))
(ann x [String -> Boolean])
(defn x [s] (s/blank? s))
Apologies if this is wrong.
I think core.string/blank? should be clojure.string/blank?. Also cf is not allowed inside a typed file.
Comment made by: julian
Clunk. You're absolutely right. Assuming there's no (cf) there, is there any way you could log an error for an annotation with no associated actual definition? Obviously, to be useful, it'd have to appear in the appropriate location in the file.
I don't know. Perhaps at the end of type checking a namespace I can check if a var exists for each annotation. I don't think it's really feasible for REPL development though.