~Here's a currently broken attempt at fixing #840. I don't know enough about cljs to know how to solve it, but for clj it works well enough.~
I should note that in clj, it doesn't work for any function that is "inlined". So, if you say (m/=> clojure.core/inc [:=> [:cat :int] :int]), calling (inc "1") won't be instrumented as it's compiled to a raw Numbers.inc("1") call. However, writing (#'inc "1") will be instrumented as it will be compiled into const__0.invoke("i").
I think that if this is noted in the docs it's an acceptable trade-off.
~Here's a currently broken attempt at fixing #840. I don't know enough about cljs to know how to solve it, but for clj it works well enough.~
I should note that in clj, it doesn't work for any function that is "inlined". So, if you say
(m/=> clojure.core/inc [:=> [:cat :int] :int])
, calling(inc "1")
won't be instrumented as it's compiled to a rawNumbers.inc("1")
call. However, writing(#'inc "1")
will be instrumented as it will be compiled intoconst__0.invoke("i")
.I think that if this is noted in the docs it's an acceptable trade-off.
Closes #840