(defn resolve-alias
"Takes a namespace and an unqualified symbol and potentially returns a new
symbol to be used in lieu of the original."
[ns sym]
;; Conditionally alias aget/aset fns to checked variants
(if (and (= 'cljs.core ns)
('#{aget aset} sym)
(checked-arrays))
(get-in '{:warn {aget checked-aget
aset checked-aset}
:error {aget checked-aget'
aset checked-aset'}}
[(checked-arrays) sym])
sym))