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 105
105
(str " Call to " v " did not conform to spec." )
106
106
ed)))
107
107
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)))
108
115
ret (fn [& args]
109
116
(if *instrument-enabled*
110
117
(with-instrument-disabled
111
118
(when (:args fn-spec) (conform! v :args (:args fn-spec) args args))
112
119
(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?
117
123
(setup-static-dispatches f ret 20 )
118
124
(when-some [variadic (.-cljs$core$IFn$_invoke$arity$variadic f)]
119
125
(set! (.-cljs$core$IFn$_invoke$arity$variadic ret)
Original file line number Diff line number Diff line change 387
387
(st/instrument `foo-2793)
388
388
(st/instrument `bar-2793)
389
389
(st/instrument `baz-2793)
390
+ (st/instrument `quux-2793)
390
391
391
392
(deftest cljs-2793-test
392
393
(is (= {:m {:x 1 :y 2 }
411
412
:y 2
412
413
:m [3 4 ]}
413
414
(bar-2793 1 2 3 4 )))
414
- (is (nil? (baz-2793 1 ))))
415
+ (is (nil? (baz-2793 1 )))
416
+ (is (nil? (quux-2793 ))))
415
417
416
418
(comment
417
419
You can’t perform that action at this time.
0 commit comments