         (err (str "class " (print-var clss) " not found in: " location))
         (lookup-field clss (.-fields (second class)) fident location)
         )
-      ))
+      )
+    type
+    (err (str "expected class type, found " (print-type type) " in: " location))
+    )
   )
 
 (defn- new-scope

    [:ident name] (str name)
    :else (str var)
    ))

(defn map-fun
  [fun]

               [narg vmap3] (add-arg vmap2 arg)] [(conj tmprgs narg) vmap3]))
    [:succ [[:args] vmap]] (rest args))
  )

(defn- print-args
  [args]
