Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* src/clj/cljs/compiler.clj: fix emitting bad code in rest fn case w/…

… only rest param
  • Loading branch information...
commit 96ca773b0535aff2c1a0e438c3f3ff64cc7dfecb 1 parent 5faa26b
David Nolen authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/clj/cljs/compiler.clj
View
3  src/clj/cljs/compiler.clj
@@ -584,7 +584,8 @@
(do (emitln "default:")
(emitln "return " n ".cljs$lang$arity$variadic.call(this,"
(comma-sep (butlast maxparams))
- ", cljs.core.array_seq(arguments, " max-fixed-arity "));"))
+ (and (> (count maxparams) 1) ", ")
+ "cljs.core.array_seq(arguments, " max-fixed-arity "));"))
(let [pcnt (count (:params meth))]
(emitln "case " pcnt ":")
(emitln "return " n ".call(this" (if (zero? pcnt) nil
Please sign in to comment.
Something went wrong with that request. Please try again.