File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -5943,6 +5943,10 @@ reduces them without incurring seq initialization"
59435943 (if (number? key)
59445944 (-assoc-n coll key val)
59455945 (throw (js/Error. " Subvec's key for assoc must be a number." ))))
5946+ (-contains-key? [coll key]
5947+ (if (integer? key)
5948+ (and (<= 0 key) (< key (- end start)))
5949+ false ))
59465950
59475951 IFind
59485952 (-find [coll n]
Original file line number Diff line number Diff line change 18441844 (is (false ? (contains? nonempty-extended :c )))
18451845 (is (true ? (contains? nonempty-extended :y )))
18461846 (is (false ? (contains? nonempty-extended :z )))))
1847+
1848+ (deftest test-cljs-3306
1849+ (let [sv (subvec [0 1 2 3 4 ] 2 4 )]
1850+ (is (true ? (contains? sv 0 )))
1851+ (is (false ? (contains? sv 0.5 )))
1852+ (is (true ? (contains? sv 1 )))
1853+ (is (false ? (contains? sv 1.5 )))
1854+ (is (false ? (contains? sv :kw ))))
1855+ (let [sv (subvec [0 1 2 3 4 ] 2 2 )]
1856+ (is (false ? (contains? sv 0 )))))
You can’t perform that action at this time.
0 commit comments