                                      {rk (merge {alias lib} {lib lib})})
                                    (when referred {uk (apply hash-map (interleave referred (repeat lib)))})))))
         use->require (fn use->require [[lib kw referred :as spec]]
-                       (assert (and (symbol? lib) (= :only kw) (sequential? referred) (every? symbol? referred))
-                               (error-msg spec "Only [lib.ns :only (names)] specs supported in :use / :use-macros"))
+                       (when-not (and (symbol? lib) (= :only kw) (sequential? referred) (every? symbol? referred))
+                         (throw (error env (error-msg spec "Only [lib.ns :only (names)] specs supported in :use / :use-macros"))))
                        [lib :refer referred])
         parse-import-spec (fn parse-import-spec [spec]
-                            (assert (and (symbol? spec) (nil? (namespace spec)))
-                                    (error-msg spec "Only lib.Ctor specs supported in :import"))
+                            (when-not (and (symbol? spec) (nil? (namespace spec)))
+                              (throw (error env (error-msg spec "Only lib.Ctor specs supported in :import"))))
                             (swap! deps conj spec)
                             (let [ctor-sym (symbol (last (string/split (str spec) #"\.")))]
                               {:import  {ctor-sym spec}


(defmethod parse 'if
  [op env [_ test then else :as form] name]
  (assert (>= (count form) 3) "Too few arguments to if")
  (let [test-expr (disallowing-recur (analyze (assoc env :context :expr) test))
        then-expr (analyze env then)
        else-expr (analyze env else)]

                       (symbol? target)
                       (do
                         (let [local (-> env :locals target)]
                           (when-not (or (nil? local)
                                         (and (:field local)
                                              (or (:mutable local)
                                                  (:unsynchronized-mutable local)
                                                  (:volatile-mutable local))))
                             (throw (error env "Can't set! local var or non-mutable field"))))
                         (analyze-symbol enve target))

                       :else
