         ret-tag (when-not (nil? (:fn-var info)) (:ret-tag info))]
     (if-not (nil? ret-tag)
       ret-tag
-      (let [ret-tag (infer-tag env (assoc (find-matching-method f (:args e)) :op :method))]
+      (let [args (:args e)
+            me (assoc (find-matching-method f args) :op :method)
+            ret-tag (infer-tag env me)]
         (if-not (nil? ret-tag)
           ret-tag
           ANY_SYM)))))

          (if (symbol? op)
            (let [opname (str op)]
              (cond
                (identical? (first opname) \.)
                (let [[target & args] (next form)]
                  (with-meta (list* #?(:clj '. :cljs DOT_SYM) target (symbol (subs opname 1)) args)
                    (meta form)))

                (identical? (last opname) \.)
                (with-meta
                  (list* #?(:clj 'new :cljs NEW_SYM) (symbol (subs opname 0 (dec (count opname)))) (next form))
                  (meta form))

      expr)))

(defn infer-type [env ast]
  (let [tag (:tag ast)]
    (if (nil? tag)
      (let [tag (infer-tag env ast)]
        (if-not (nil? tag)
          (assoc ast :tag tag)
          ast))
      ast)))

(def ^:dynamic *passes* nil)

