We're updating the issue view to help you get more done. 

Unnecessary reflection with `indexOf` on vector

Description

This generates a reflection warning:

1 2 3 4 5 6 (let [id-1 3 id-2 1 id-3 2 ids [id-1 id-2 id-3]] #(compare (.indexOf ids %1) (.indexOf ids %2))) ;; => call to method indexOf on clojure.lang.IPersistentVector can't be resolved (no such method).

This does not:

1 2 (let [ids [3 2 1]] #(compare (.indexOf ids %1) (.indexOf ids %2)))

The only difference is whether the elements of the vector are literal, which shouldn't affect the call to indexOf.

Environment

None

Status

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

None

Affects versions

Release 1.9

Priority

Minor