user=> (set! *warn-on-reflection* true)
true
user=> (.contains [] 0)
Reflection warning, NO_SOURCE_PATH:1:1 - call to method contains on clojure.lang.IPersistentVector can't be resolved (no such method).
false
user=> (.contains [1] 0)
false
user=> (.contains ^:foo [1] 0)
Reflection warning, NO_SOURCE_PATH:1:1 - call to method contains on clojure.lang.IPersistentVector can't be resolved (no such method).
false
user=> (.contains [(inc 1)] 0)
Reflection warning, NO_SOURCE_PATH:1:1 - call to method contains on clojure.lang.IPersistentVector can't be resolved (no such method).
false
Even worse, type hinting doesn't get picked up :
user=> (.contains ^java.util.Collection [] 0)
Reflection warning, NO_SOURCE_PATH:1:1 - call to method contains on clojure.lang.IPersistentVector can't be resolved (no such method).
false
user=> (.contains ^java.util.Collection [(inc 1)] 0)
Reflection warning, NO_SOURCE_PATH:1:1 - call to method contains on clojure.lang.IPersistentVector can't be resolved (no such method).
false
user=> (.contains ^java.util.Collection (identity [(inc 1)]) 0)
false
Similar issues apply to other literals