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

0 votes
in ClojureScript by
If a call is made to a function that has hinted arguments (especially {^boolean} and {^number}), with an expression that is known to not be of that type, emit a diagnostic type mismatch warning.

An example that should emit a warning is:


(defn f [^boolean b])
(f 0)

2 Answers

0 votes
by

Comment made by: mfikes

If we infer parameter types then we can additionally do this even when unhinted. (Example https://gist.github.com/mfikes/1e2341b48b882587500547f6ba19279d)

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-1562 (reported by mfikes)
Welcome to Clojure Q&A, where you can ask questions and receive answers from members of the Clojure community.
...