Fork me on GitHub

An error I just caught in a PR (and simplified into obvious small case)

(let [strings (filter string? (range 23))]
  (when strings
    (println "i found strings")))
The intention here is when strings are found, but the empty lazy seq returned from the filter is always truthy. I know clj-kondo has some type-inference going on. Is it possible for it to catch this error?


@dpsutton It doesn't currently have this but I love that idea.


cool. i’ll make an issue then. wasn’t sure if it was something you had enough info to work with at all. glad to know


I think I saw this issue before in the recent days when I went through all of them, and yes, here it is: Give it a thumbs up.

👍 1

i added the edge case i could think of and a thumbs up. Thanks @borkdude

👍 1