File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1952,12 +1952,12 @@ reduces them without incurring seq initialization"
19521952 (-lookup o k not-found)
19531953
19541954 (array? o)
1955- (if (and (some? k) (>= k 0 ) ( < k (.-length o)))
1955+ (if (and (some? k) (< -1 k (.-length o)))
19561956 (aget o (int k))
19571957 not-found)
19581958
19591959 (string? o)
1960- (if (and (some? k) (>= k 0 ) ( < k (.-length o)))
1960+ (if (and (some? k) (< -1 k (.-length o)))
19611961 (.charAt o (int k))
19621962 not-found)
19631963
Original file line number Diff line number Diff line change 15371537(deftest test-cljs-2457
15381538 (is (thrown-with-msg? js/Error #".* is not ISeqable" (seq #js {:a 1 :b 2 }))))
15391539
1540+ (deftest test-cljs-2537
1541+ (is (true ? (contains? (to-array [7 13 41 ]) -0.5 )))
1542+ (is (== 7 (get (to-array [7 13 41 ]) -0.5 )))
1543+ (is (== 7 (get (to-array [7 13 41 ]) -0.5 :not-found )))
1544+ (is (true ? (contains? " ab" -0.5 )))
1545+ (is (= \a (get " ab" -0.5 )))
1546+ (is (= \a (get " ab" -0.5 :not-found ))))
1547+
15401548(deftest test-cljs-2549
15411549 (let [tap (fn [_])]
15421550 (add-tap tap)
You can’t perform that action at this time.
0 commit comments