Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by
retagged by

Given the following code:

(ns app.core)

(set! *warn-on-infer* true)

(defprotocol IFoo
  (bar [this]))

;; warns on inference - expected?
(defn not-ok? [v]
  (satisfies? IFoo v))

..is it expected that the following inference warning should be produced?

WARNING: Cannot infer target type in expression (. v -app$core$IFoo$) at line 10 /Users/user/projects/cljs-protocol-inference-warning/src/app/core.cljs

repro case is available here: https://github.com/dazld/cljs-protocol-inference-warning

Notes:

  • providing a hint of any sort makes the inference warning go away

1 Answer

0 votes
by
selected by
...