Open ul opened 9 years ago
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)))
When
(defmethod foo :default bar [x] "return me")
is used, Cursive highlights bothbar
andx
as “cannot be resolved”. But it is valid (and sometimes useful) form ofdefmethod
: http://clojuredocs.org/clojure.core/defmethod#example-542692c7c026201cdc3269cd