cursive
cursive copied to clipboard
defmethod parse broken if fn-tail contains fn name
When (defmethod foo :default bar [x] "return me")
is used, Cursive highlights both bar
and x
as “cannot be resolved”. But it is valid (and sometimes useful) form of defmethod
: http://clojuredocs.org/clojure.core/defmethod#example-542692c7c026201cdc3269cd
This would be great to have, otherwise to get decent stack traces with multimethods, an intermediate function has to be manually created. Is there any way to do a workaround using "resolve as.." ?
Apart from being useful for getting decent stack traces, it's also vital when using multi-arity multimethods:
(defmethod foo :default bar
([x] (bar x "hello"))
([x y] (println x y)))