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

0 votes
in Clojure by

^long type hints on let binding values don't do anything:

`
user=> (def x 1)

'user/x

user=> (set! warn-on-reflection true)
true
user=> (let [w ^long x] (Long/valueOf w))
Reflection warning, NO_SOURCE_PATH:13:18 - call to static method valueOf on java.lang.Long can't be resolved (argument types: unknown).
1
user=> (let [w (long x)] (Long/valueOf w))
1
user=>
`

but clojure.string/index-of has at least two cases of them, and even if they did do something, there is no reflective code that would take advantage of those type hints.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2155 (reported by hiredman)
...