File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11361136 (not ('#{any clj clj-or-nil clj-nil number string boolean function object array js} tag))
11371137 (when-let [ps (:protocols (ana/resolve-existing-var env tag))]
11381138 (ps protocol)))))))
1139+ first-arg-tag (ana/infer-tag env (first (:args expr)))
11391140 opt-not? (and (= (:name info) 'cljs.core/not)
1140- (= (ana/infer-tag env (first (:args expr))) 'boolean))
1141+ (= first-arg-tag 'boolean))
1142+ opt-count? (and (= (:name info) 'cljs.core/count)
1143+ (boolean ('#{string array} first-arg-tag)))
11411144 ns (:ns info)
11421145 js? (or (= ns 'js) (= ns 'Math))
11431146 goog? (when ns
11931196 opt-not?
11941197 (emits " (!(" (first args) " ))" )
11951198
1199+ opt-count?
1200+ (emits " ((" (first args) " ).length)" )
1201+
11961202 proto?
11971203 (let [pimpl (str (munge (protocol-prefix protocol))
11981204 (munge (name (:name info))) " $arity$" (count args))]
Original file line number Diff line number Diff line change 17031703 (is (= " ab" (str " a" nil " b" )))
17041704 (is (= " ahellob" (str " a" (str-fn-2865 ) " b" ))))
17051705
1706+ (deftest test-cljs-2886
1707+ (is (zero? (count " " )))
1708+ (is (== 1 (count " a" )))
1709+ (is (zero? (count #js [])))
1710+ (is (== 1 (count #js [1 ])))
1711+ (is (zero? (count [])))
1712+ (is (== 1 (count [1 ]))))
1713+
17061714(deftest test-cljs-2934
17071715 (let [x (delay 1 )]
17081716 (is (= " #object[cljs.core.Delay {:status :pending, :val nil}]" (pr-str x)))
You can’t perform that action at this time.
0 commit comments