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

0 votes
in ClojureScript by

`
(ns demo.app)

(set! warn-on-infer true)

(deftype Foo []
Object
(bar [this] :bar))
`

produces an inference warning when compiling.

WARNING: Cannot infer target type in expression (. (. Foo -prototype) -bar) at line 5 .../src/demo/app.cljs

Instead it should collect the {{bar}} property and generate externs for it since it is very likely that extending Object will be used to implement JS interfaces (eg. React lifecycle methods).

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2862 (reported by thheller)
...