Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect reporting of unused bindings after 4th function in letfn binding #2386

Closed
vincentjames501 opened this issue Aug 30, 2024 · 3 comments

Comments

@vincentjames501
Copy link

  • [x ] I have read the Clojure etiquette and will respect it when communicating on this platform.

version

clj-kondo v2024.08.29

platform

Native version (MacOS)

problem

clj-kondo incorrectly reports unused bindings after 4th function in letfn binding

src/cljkondolint.clj:12:18: warning: unused binding a
src/cljkondolint.clj:12:20: warning: unused binding b
src/cljkondolint.clj:14:18: warning: unused binding a
src/cljkondolint.clj:14:20: warning: unused binding b

repro

(def xxx
  (letfn [(abc [a b]
            (+ a b))
          (abc2 [a b]
            (+ a b))
          (abc3 [a b]
            (+ a b))
          (abc4 [a b]
            (+ a b))
          (abc5 [a b]
            (+ a b))
          (abc6 [a b]
            (+ a b))]
    (abc 1 2)
    (abc2 1 2)
    (abc3 1 2)
    (abc4 1 2)
    (abc5 1 2)
    (abc6 1 2)))
@borkdude
Copy link
Member

Thanks. Did this problem also occur with the previous version?

@github-project-automation github-project-automation bot moved this to Needs triage in clj-kondo Aug 30, 2024
@borkdude borkdude moved this from Needs triage to High priority (next release) in clj-kondo Aug 30, 2024
@vincentjames501
Copy link
Author

@borkdude , ah I forgot to say! No it did not. I did a brew update and started getting this. I'm not super sure exactly which version I came from but I believe it must be pretty recent.

@borkdude
Copy link
Member

Found the issue. Bitten by Clojure laziness. I'll merge the fix tomorrow.

@github-project-automation github-project-automation bot moved this from High priority (next release) to Done in clj-kondo Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants