We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 168b8a4 commit 8cb81dbCopy full SHA for 8cb81db
src/main/cljs/cljs/core.cljs
@@ -2364,6 +2364,9 @@ reduces them without incurring seq initialization"
2364
(implements? IAssociative coll)
2365
(-contains-key? coll v)
2366
2367
+ (native-satisfies? IAssociative coll)
2368
+ (-contains-key? coll v)
2369
+
2370
(identical? (get coll v lookup-sentinel) lookup-sentinel)
2371
false
2372
src/test/cljs/cljs/extend_to_native_test.cljs
@@ -144,3 +144,11 @@
144
145
(deftest test-protocol-with-slash
146
(is (= "result" (/ ""))))
147
148
+(deftest test-cljs-3307
149
+ (extend-type object
150
+ IAssociative
151
+ (-contains-key? [_ k] (= k :valid)))
152
153
+ (is (contains? #js {} :valid))
154
+ (is (not (contains? #js {} :invalid))))
0 commit comments