Fork me on GitHub
#clj-kondo
<
2021-10-11
>
Pratik10:10:17

What is the right setting for docstrings for multimethods? I have this code which gives misplaced-docstring errors

(defmethod foo :bar
[arg1 arg2]
"doc string"
(prn "Func body"))
If I move the docstring before the arguments the multimethod breaks

borkdude10:10:54

@pratikgandhi1997 AFAIK docstrings on defmethods aren't supported, only on defmulti

Pratik11:10:21

ah, got it, if it was supported then there would be a mix-up between a string dispatch value and the doc strings. Thanks for the quick response!

👍 1