         protocol (-> sym meta :protocol)
         dynamic (-> sym meta :dynamic)
         ns-name (-> env :ns :name)
-        locals (:locals env)]
+        locals (:locals env)
+        clash-ns (symbol (str ns-name "." sym))]
+    (when (get-in @env/*compiler* [::namespaces clash-ns])
+      (warning :ns-var-clash env
+        {:ns (symbol (str ns-name "." sym))
+         :var (symbol (str ns-name) (str sym))}))
     (when (namespace sym)
       (throw (error env "Can't def ns-qualified name")))
     (when-let [doc (:doc args)]

   :protocol-duped-method true
   :protocol-multiple-impls true
   :single-segment-namespace true
   :munged-namespace true})

(def js-reserved
  #{"abstract" "boolean" "break" "byte" "case"

        (update-in indexed [:require-macros] (fnil into []) require-specs))
      args)))

(defn find-def-clash [env ns segments]
  (let [to-check (map (fn [xs]
                        [(symbol (string/join "." (butlast xs)))
                         (symbol (last xs))])
                   (drop 2 (reductions conj [] segments)))]
    (doseq [[clash-ns name] to-check]
      (when (get-in @env/*compiler* [::namespaces clash-ns :defs name])
        (warning :ns-var-clash env
          {:ns ns
           :var (symbol (str clash-ns) (str name))})))))

(defmethod parse 'ns
  [_ env [_ name & args :as form] _ opts]
  (when-not (symbol? name) 
