diff options
Diffstat (limited to 'clojurescript/tojs.clj')
-rw-r--r-- | clojurescript/tojs.clj | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clojurescript/tojs.clj b/clojurescript/tojs.clj index 4bf23d39..7c7f6fea 100644 --- a/clojurescript/tojs.clj +++ b/clojurescript/tojs.clj @@ -58,7 +58,7 @@ manym (< 1 (count (.methods e))) newctx (assoc ctx :fnname (.thisName e))] (vstr [(when (.variadicMethod e) - "clojure.JS.variatic") + ["clojure.JS.variatic(" (count (.reqParms maxm)) ","]) "(function" (when *debug-fn-names* [" __" (.replaceAll (.name e) "[\\W_]+" "_")]) @@ -73,7 +73,10 @@ (fnmethod fm maxm newctx)])) "}"]) "\n" - (fnmethod maxm maxm newctx) "})"]))) + (fnmethod maxm maxm newctx) "})" + (when (.variadicMethod e) + ")") + ]))) (defmethod tojs clojure.lang.Compiler$BodyExpr [e ctx] (apply str (interpose ",\n" (map #(tojs % ctx) (.exprs e))))) |