(def) or (defn) will throw an obscure exception

Description

Simply trying to compile `(def)` will throw an exception: "Caused by: clojure.lang.ArityException: Wrong number of args (1) passed to: analyzer/eval1440/fn--1441/pfn--1442"

While obviously not a valid construct, the error could be significantly more descriptive, and also show the line number where it happened.

A similar issue happens with `(defn)`: "Caused by: clojure.lang.ExceptionInfo: Wrong number of args (2) passed to: core/defn--12230"

Environment

None

Activity

Show:
Mike Fikes
January 30, 2016, 3:03 AM

FWIW, the defn case is a little better now with CLJS-1516, reporting 0 args passed:

Completed

Assignee

Unassigned

Reporter

Sean Grove

Labels

Approval

None

Patch

None

Affects versions

Priority

Minor