Fork me on GitHub
#cljs-dev
<
2019-09-05
>
thheller14:09:48

@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

thheller14:09:16

since resolve-var pretty much resolves any symbol it resolves and further checks fail. still seems weird that it is trying to resolve .

thheller14:09:58

doesn't exhibit as a bug in CLJS since it blindly accepts all symbols with a . in them and never warns for them

mfikes15:09:14

Does the above ticket cover it, or do we need a separate ticket?

thheller15:09:06

well the CLJS-712 kinda hides the other issue. so fixing that would cause warnings. might make sense to fix the other issue first

mfikes15:09:33

I don’t mind adding a ticket. I can take care of that

thheller15:09:38

yeah just needs a (not= '. (first test)) check added to the other checks I guess

thheller15:09:57

or do other logic in that case

thheller15:09:08

dunno much about the type inference setup

mfikes15:09:42

(specials)

mfikes15:09:09

I’ll put together a simple ticket and patch that does that.

👍 8
thheller15:09:15

yeah that might make sense

mfikes15:09:03

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