Closed aiba closed 5 years ago
Ah, good catch. Most of cljs-oops was developed before introduction of *warn-on-infer*
. I have never tried to enable it myself.
I would have to look deeper into this because I don't really understand the infer message. If you want to take stab at it, here is the code generation responsible for emitting code for ocall
:
https://github.com/binaryage/cljs-oops/blob/df9ef052a09fac15dc88099acc8a7a504f47ca50/src/lib/oops/codegen.clj#L378
Is it expected that
ocall
should generate a warning when*warn-on-infer*
is enabled?Produces compiler warning:
Perhaps the oops codegen could typehint the fn-* symbol with
^js/Function
?