Fork me on GitHub
#cljs-dev
<
2021-08-20
>
Roman Liutikov09:08:52

is this a known diff between Clojure and ClojureScript?

(defn f
  ([x] 1)
  ([x y] 2))

(with-redefs [f (fn [] 1)]
  (f))
No warning in Clojure, but WARNING: Wrong number of args (0) passed to cljs.user/f at line 2 in cljs

borkdude09:08:13

Clojure doesn't warn about arity mismatches in general

borkdude09:08:21

I bet the problem here is that the CLJS analyzer doesn't account for dynamic redefs

dnolen13:08:37

@borkdude the compiler cannot see dynamic stuff - so there's nothing to do

👍 2