If I have a bit of code like this I get a failure to disambiguate method:
(when (not (utils/has-value? code))
(throw (TizraError. (str "No access code was found on remote login request."))))
If I change the code like this, it does not signal the incorrect error:
(when (not (utils/has-value? code))
(throw (new TizraError (str "No access code was found on remote login request."))))
Originally I thought the annotation on clojure.core/str was being missed, but it seems to be a problem with all constructors like this.
This code is another way to defeat the erroneous warning:
(when (not (utils/has-value? code))
(throw (TizraError. ^String (str "No access code was found on remote login request."))))
I do see this kind of missed type hint problem with other method calls, but I have not been able to figure out what the triggers are. As this check is also linked to all of Cursive's java interop checks (many of which we really need, and which cannot be done by clj-kondo), there's no way to even reduce the severity easily, because all the Java interop checks are controlled by a single setting.
If I have a bit of code like this I get a failure to disambiguate method:
If I change the code like this, it does not signal the incorrect error:
Originally I thought the annotation on
clojure.core/strwas being missed, but it seems to be a problem with all constructors like this.This code is another way to defeat the erroneous warning:
I do see this kind of missed type hint problem with other method calls, but I have not been able to figure out what the triggers are. As this check is also linked to all of Cursive's java interop checks (many of which we really need, and which cannot be done by
clj-kondo), there's no way to even reduce the severity easily, because all the Java interop checks are controlled by a single setting.