`
(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).