I've not been able to get this any smaller, with these two files:
Running `clj -M --main cljs.main --compile hello-world.core` will give this warning:
This bug goes away if you:
Change to `(not (object? x))` and move the call to `some-type` into the `else` position
Always call `some-type`
So it's specifically about the output produced by `if`.
I’ve dug in a little, problem seems to stem from the call to type? here: https://github.com/clojure/clojurescript/blob/5e88d3383e0f950c4de410d3d6ee11769f3714f4/src/main/clojure/cljs/analyzer.cljc#L1398
type? attempts to resolve the var of the type here: https://github.com/clojure/clojurescript/blob/5e88d3383e0f950c4de410d3d6ee11769f3714f4/src/main/clojure/cljs/analyzer.cljc#L1364 but that returned type might be private, hence triggering the warning.
I’ve uploaded a patch which suppresses private-var-access warnings when “type?” resolves a var by using “with-warning-handlers”.