File tree 2 files changed +19
-2
lines changed
2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 2212
2212
`(let [~xsym ~x]
2213
2213
(if-not (nil? ~xsym)
2214
2214
(if (or ~(if bit `(unsafe-bit-and (. ~xsym ~msym) ~bit) false )
2215
- (identical? cljs.core/PROTOCOL_SENTINEL (. ~xsym ~(symbol (core/str " -" prefix)))))
2215
+ (identical? cljs.core/PROTOCOL_SENTINEL
2216
+ (. ~xsym ~(with-meta (symbol (core/str " -" prefix)) {:protocol-method true }))))
2216
2217
true
2217
2218
(if (coercive-not (. ~xsym ~msym))
2218
2219
(cljs.core/native-satisfies? ~psym ~xsym)
2219
2220
false ))
2220
2221
(cljs.core/native-satisfies? ~psym ~xsym)))
2221
2222
`(if-not (nil? ~x)
2222
2223
(if (or ~(if bit `(unsafe-bit-and (. ~x ~msym) ~bit) false )
2223
- (identical? cljs.core/PROTOCOL_SENTINEL (. ~x ~(symbol (core/str " -" prefix)))))
2224
+ (identical? cljs.core/PROTOCOL_SENTINEL
2225
+ (. ~x ~(with-meta (symbol (core/str " -" prefix)) {:protocol-method true }))))
2224
2226
true
2225
2227
(if (coercive-not (. ~x ~msym))
2226
2228
(cljs.core/native-satisfies? ~psym ~x)
Original file line number Diff line number Diff line change 398
398
:with-core? true }))]
399
399
(is (empty? @ws))))
400
400
401
+ (deftest test-cljs-3257
402
+ (let [ws (atom [])
403
+ res (binding [ana/*cljs-static-fns* true ]
404
+ (infer-test-helper
405
+ {:forms '[(ns app.core )
406
+ (set! *warn-on-infer* true )
407
+ (defprotocol IFoo
408
+ (bar [this]))
409
+ (defn not-ok? [v]
410
+ (satisfies? IFoo v))]
411
+ :warnings ws
412
+ :warn true
413
+ :with-core? true }))]
414
+ (is (empty? @ws))))
415
+
401
416
(comment
402
417
(binding [ana/*cljs-ns* ana/*cljs-ns*]
403
418
(ana/no-warn
You can’t perform that action at this time.
0 commit comments