cursive icon indicating copy to clipboard operation
cursive copied to clipboard

defmethod parse broken if fn-tail contains fn name

Open ul opened this issue 9 years ago • 2 comments

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

ul avatar May 23 '15 09:05 ul

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.." ?

axelarge avatar May 20 '20 09:05 axelarge

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)))

p-himik avatar Jun 04 '20 20:06 p-himik