File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 105105 (str " Call to " v " did not conform to spec." )
106106 ed)))
107107 conformed)))
108+ pure-variadic? (and (-> (meta v) :top-fn :variadic? )
109+ (zero? (-> (meta v) :top-fn :max-fixed-arity )))
110+ apply' (fn [f args]
111+ (if (and (nil? args)
112+ pure-variadic?)
113+ (.cljs$core$IFn$_invoke$arity$variadic f)
114+ (apply f args)))
108115 ret (fn [& args]
109116 (if *instrument-enabled*
110117 (with-instrument-disabled
111118 (when (:args fn-spec) (conform! v :args (:args fn-spec) args args))
112119 (binding [*instrument-enabled* true ]
113- (apply f args)))
114- (apply f args)))]
115- (when-not (and (-> (meta v) :top-fn :variadic? )
116- (zero? (-> (meta v) :top-fn :max-fixed-arity )))
120+ (apply' f args)))
121+ (apply' f args)))]
122+ (when-not pure-variadic?
117123 (setup-static-dispatches f ret 20 )
118124 (when-some [variadic (.-cljs$core$IFn$_invoke$arity$variadic f)]
119125 (set! (.-cljs$core$IFn$_invoke$arity$variadic ret)
Original file line number Diff line number Diff line change 387387(st/instrument `foo-2793)
388388(st/instrument `bar-2793)
389389(st/instrument `baz-2793)
390+ (st/instrument `quux-2793)
390391
391392(deftest cljs-2793-test
392393 (is (= {:m {:x 1 :y 2 }
411412 :y 2
412413 :m [3 4 ]}
413414 (bar-2793 1 2 3 4 )))
414- (is (nil? (baz-2793 1 ))))
415+ (is (nil? (baz-2793 1 )))
416+ (is (nil? (quux-2793 ))))
415417
416418(comment
417419
You can’t perform that action at this time.
0 commit comments