Closed cldwalker closed 1 year ago
Do you have an idea since which version this started happening?
On Fri, 23 Dec 2022 at 03:23, Gabriel Horner @.***> wrote:
Hi @borkdude https://github.com/borkdude. Encountered this bug while upgrading nbb-features https://github.com/babashka/nbb-features/commit/d6b6249cad6d908a25681ee0249762baa872b7b4. It is easy to work around this destructuring bug but thought you should know
version
1.1.155
platform
osx 12.0.1 and node 16.13.1
problem
When destructuring inside of a defmethod argument, the destructuring bindings are not recognized
repro
nbb-logseq -e "(require '[cljs.test :as t]) (defmethod t/report [::t/default :end-run-tests] [{:keys [error fail]}] (prn :ERR error))" ---- Error -------------------------------------- Message: Could not resolve symbol: error Location: 1:102 Phase: analysis ...
expected behavior
I expected the above to evaluate without error. This evaluates fine with 0.7.135
— Reply to this email directly, view it on GitHub https://github.com/babashka/nbb/issues/292, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFSBVT5UDB3CA7NC6O57TWOUEKFANCNFSM6AAAAAATHJXDGM . You are receiving this because you were mentioned.Message ID: @.***>
-- https://www.michielborkent.nl https://www.eetvoorjeleven.nu
Yeah, this indeed looks weird:
$ ./cli.js -e "(macroexpand '(defmethod foo ::dude [k {:keys [a]}] a))"
(clojure.core/multi-fn-add-method-impl foo :user/dude (fn* [k {:keys [a]}] a))
That was quick. Thanks!
Hi @borkdude. Encountered this bug while upgrading nbb-features. It is easy to work around this destructuring bug but thought you should know
version
1.1.155
platform
osx 12.0.1 and node 16.13.1
problem
When destructuring inside of a defmethod argument, the destructuring bindings are not recognized
repro
expected behavior
I expected the above to evaluate without error. This evaluates fine with 0.7.135