Fork me on GitHub
#clj-kondo
<
2020-03-06
>
oliy15:03:10

Hi, me again. I've found a false positive pair in unused binding field and unresolved symbol field with this:

(defn foo [k {v k}] v)

(foo :a {:a 1}) ;; -> 1

oliy15:03:15

(both instances of k are highlighted respectively)

oliy16:03:01

Ah thank you, I searched but it was hard to know how to describe the code :)

borkdude16:03:12

If you think this is supported by Clojure (and not just accidental behavior) talk to Alex Miller or anyone else from the core team. If they think it should be supported as official Clojure, I would be happy to fix it.

borkdude16:03:28

But as of now it seems they don't support it.

oliy16:03:35

Yeah I find it hard to read myself so I'm not a fan of it, but it is wonderfully terse

oliy16:03:44

I'll just rewrite

borkdude16:03:26

I pasted this convo over there now: https://github.com/borkdude/clj-kondo/issues/782#issuecomment-595835968 In case anyone else searches for it.

💯 4
dominicm21:03:35

I work on the same codebase as oliy. I'm so glad that code can be killed now. I was shocked & horrified when I found it.

🔫 4