Open danielcompton opened 8 years ago
From Slack by @cursive-ide:
@danielcompton: Cursive actually already does flow that info, but currently models what Clojure does, and Clojure doesn’t automatically add a tag to def based on the type of a simple expression. Cursive could retain that info and prompt to add a hint, as you suggest.
It would be handy if Cursive could flow types through from simple expressions into their call sites, e.g.
I can think of a few possibilities here:
A related but separate issue is that a lot of the errors we get in our CLJS apps are when we deref what we think is a Reagent Reaction, but it has already been dereffed further up the call hierarchy. Having type checks like "is this var
IDeref
able?" when derefing would catch quite a few bugs for us.EDIT: another common bug is mixing up maps and keywords the in functions like update, assoc, get e.t.c.