Minimal example, using 1.9.0-alpha11:
`
user=> (set! warn-on-reflection true)
true
user=> (defn foo ^String [^long x] "")
'user/foo
user=> (.length (foo 10))
Reflection warning, (...) - reference to field length on java.lang.Object can't be resolved.
0
`
The warning is present only if direct linking is disabled.
Explanation:
this is another manifestation of CLJ-1533 -- because of the lexical transformation the compiler is doing when routing the invoke through invokePrim, the arglists type hints are lost. This doesn't happen when DL is on because invokeStatic isn't compiled via a lexical transformation but through StaticInvokeExpr which properly tracks the original var's type hints
Patch: 0001-CLJ-2005-assoc-arglist-ret-tag-as-tag-in-constructed.patch