cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
thheller 2019-09-05T14:14:48.038200Z

@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

thheller 2019-09-05T14:16:16.039300Z

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

thheller 2019-09-05T14:16:58.039900Z

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

thheller 2019-09-05T15:14:13.040200Z

https://clojure.atlassian.net/browse/CLJS-712

mfikes 2019-09-05T15:27:14.040900Z

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

thheller 2019-09-05T15:32:06.041600Z

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

mfikes 2019-09-05T15:32:33.042300Z

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

thheller 2019-09-05T15:33:38.042800Z

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

thheller 2019-09-05T15:33:57.043100Z

or do other logic in that case

thheller 2019-09-05T15:34:08.043400Z

dunno much about the type inference setup

mfikes 2019-09-05T15:34:42.044Z

(specials)

mfikes 2019-09-05T15:35:09.044400Z

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

👍 2
thheller 2019-09-05T15:35:15.044600Z

yeah that might make sense

mfikes 2019-09-05T15:40:08.044900Z

^ https://clojure.atlassian.net/browse/CLJS-3163

mfikes 2019-09-05T15:46:03.045700Z

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