Fork me on GitHub
#clj-kondo
<
2022-11-16
>
borkdude18:11:09

I found a bug in clj-kondo in that it doesn't report a class name like Exception or String in a .cljc file when used in the :cljs branch and also not when used in .cljs files. Now the question is, should cases like:

(defn foo ^String [x] x)
give a warning for the CLJS context, since String isn't known in CLJS, although the compiler just ignores it

borkdude18:11:33

It will make writing .cljc files a bit more convenient if clj-kondo would ignore it for the CLJS side too (since the compiler doesn't complain, you will get away with less reader conditionals)

👍 2
serioga08:11:36

Does type hint for return value have any effect in cljs? I suppose that no, so ignoring is fine

👍 1