@mfikes there is a bug in the type inference you added for if
when using (if (. response -ok) ...)
. the test
is a list with 3 elements and all syms. so it tries to analyze the .
as a function. https://github.com/clojure/clojurescript/blob/b38ded99dc0967a48824d55ea644bee86b4eae5b/src/main/clojure/cljs/analyzer.cljc#L1602
since resolve-var
pretty much resolves any symbol it resolves and further checks fail. still seems weird that it is trying to resolve .
doesn't exhibit as a bug in CLJS since it blindly accepts all symbols with a .
in them and never warns for them
Does the above ticket cover it, or do we need a separate ticket?
well the CLJS-712
kinda hides the other issue. so fixing that would cause warnings. might make sense to fix the other issue first
I don’t mind adding a ticket. I can take care of that
yeah just needs a (not= '. (first test))
check added to the other checks I guess
or do other logic in that case
dunno much about the type inference setup
Maybe even ignore anything in https://github.com/clojure/clojurescript/blob/b38ded99dc0967a48824d55ea644bee86b4eae5b/src/main/clojure/cljs/analyzer.cljc#L1327
(specials)
I’ll put together a simple ticket and patch that does that.
yeah that might make sense
no-warn
is used when analyzing .
in that code, so no warnings should be emitted
but, it arguably can’t hurt to bail if the first symbol is a special and avoid any add-on issues