Fork me on GitHub
#cljs-dev
<
2016-02-20
>
mfikes03:02:13

The docstring for extend-type has some copy that may have been copied from Clojure: “Propagates the type as a type hint on the first argument of all fns.” I say this because

(extend-type boolean ICounted (-count [b] (if b 1 0)))
is not the same as
(extend-type boolean ICounted (-count [^boolean b] (if b 1 0)))
which my interpretation of this sentence would imply. Is there perhaps a defect?

dnolen15:02:41

@mfikes: the docstring reflects how it works

dnolen15:02:13

with maybe the exception of JS primitives

mfikes15:02:07

Ahh. I didn't try a non-primitive. Cool.

mfikes15:02:35

I could look into a patch taking care of primitives if that makes sense. (Will scrutinize the code.)

mfikes17:02:33

If anyone’s interested in the above: http://dev.clojure.org/jira/browse/CLJS-1582