Skip to content

Commit 32e7559

Browse files
kamndnolen
authored andcommitted
CLJS-1316 let does not detect invalid binding vector when it contains destructuring
In order for assert-args to work properly you need to pass fnname first. Fixes issue for let and loop
1 parent 1b3b043 commit 32e7559

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/clojure/cljs/core.cljc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@
692692
the binding-forms are bound to their respective init-exprs or parts
693693
therein."
694694
[bindings & body]
695-
(assert-args
695+
(assert-args let
696696
(vector? bindings) "a vector for its binding"
697697
(even? (count bindings)) "an even number of forms in binding vector")
698698
`(let* ~(destructure bindings) ~@body))
@@ -702,7 +702,7 @@
702702
the binding-forms are bound to their respective init-exprs or parts
703703
therein. Acts as a recur target."
704704
[bindings & body]
705-
(assert-args
705+
(assert-args loop
706706
(vector? bindings) "a vector for its binding"
707707
(even? (count bindings)) "an even number of forms in binding vector")
708708
(core/let [db (destructure bindings)]

0 commit comments

Comments
 (0)