(defn analyze-fn-method-param [env]
(fn [[locals params] name]
(when (namespace name)
(throw (error env (str "Can't use qualified name as parameter: " name))))
(let [line (get-line name env)
column (get-col name env)
nmeta (meta name)
tag (:tag nmeta)
shadow (when (some? locals)
(locals name))
env (merge (select-keys env [:context])
{:line line :column column})
param {:op :var
:name name
:line line
:column column
:tag tag
:shadow shadow
;; Give the fn params the same shape
;; as a :var, so it gets routed
;; correctly in the compiler
:env env
:info {:name name :shadow shadow}
:binding-form? true}]
[(assoc locals name param) (conj params param)])))