clj-kondo 2025-08-21

I don't know if this is a recent addition to clj-kondo but toString is flagged in the followed as an "unresolved protocol method":

user=> (str (reify clojure.lang.IReduceInit (reduce [_ _ _]) (toString [_] "Hello!")))
"Hello!"
I mean, yeah, I guess it is but... what would satisfy clj-kondo here and still be legal, working Clojure code?

The real-world version of this is in next.jdbc for the various plan implementations that do something similar to the above.

Yeah, I was sort of thinking that but reify is for "a protocol or interface" -- and Object is neither -- but, you're right that it works and silences clj-kondo...

Ah, Object is called out as a special case for reify in the docstring!

a good reminder to go read the docstring again

(ah! not to you. i mean a good reminder to me!)

I guess I was a bit surprised that the original code worked, once clj-kondo flagged it. TIL ๐Ÿ™‚

yes, Object :)

next.jdbc.result-set is now "clean" ๐Ÿ™‚

๐Ÿงน 4