I was introducing a namespace that included a defrecord.
My defrecord was wrong; it used a keyword to define a field, not a symbol. Minimal test case:
However, the exception was perplexing:
The error was attributed to app.clj (useclj16.app), a namespace which requires useclj16.init, the namespace containing the defrecord.
No indication that this concerned a defrecord, or even what namespace contained the error, was present in the exception.
Approach: Check explicitly that the fields are all symbols, for both defrecord and deftype, and throw a CompilerException with file, line, and column number if not. Example of exception after patch is applied, in the case give above:
Screened by: Alex Miller