Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/clojure/cljs/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -3287,9 +3287,9 @@
argseq#))))
(if (:macro meta)
`(throw (js/Error.
(str "Invalid arity: " (- (alength (js-arguments)) 2))))
(.join (array "Invalid arity: " (- (alength (js-arguments)) 2)) "")))
`(throw (js/Error.
(str "Invalid arity: " (alength (js-arguments))))))))))
(.join (array "Invalid arity: " (alength (js-arguments))) ""))))))))
~@(map #(fn-method name %) fdecl)
;; optimization properties
(set! (. ~name ~'-cljs$lang$maxFixedArity) ~maxfa)
Expand Down
3 changes: 3 additions & 0 deletions src/test/cljs_build/trivial/core2.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(ns trivial.core2)

(. js/console (-lookup 1 2))
13 changes: 13 additions & 0 deletions src/test/clojure/cljs/build_api_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,19 @@
(build/build (build/inputs (io/file inputs "trivial/core.cljs")) opts cenv)
(is (< (.length out-file) 10000))))

(deftest trivial-output-size-protocol
(let [out (.getPath (io/file (test/tmp-dir) "trivial-output-protocol-test-out"))
out-file (io/file out "main.js")
{:keys [inputs opts]} {:inputs (str (io/file "src" "test" "cljs_build"))
:opts {:main 'trivial.core2
:output-dir out
:output-to (.getPath out-file)
:optimizations :advanced}}
cenv (env/default-compiler-env)]
(test/delete-out-files out)
(build/build (build/inputs (io/file inputs "trivial/core2.cljs")) opts cenv)
(is (< (.length out-file) 10000))))

(deftest cljs-3255-nil-inputs-build
(let [out (.getPath (io/file (test/tmp-dir) "3255-test-out"))
out-file (io/file out "main.js")
Expand Down
Loading