<< Back to previous view

[CLJ-405] better error messages for bad defrecord calls Created: 20/Jul/10  Updated: 14/Dec/15

Status: Open
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Assembla Importer Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: defrecord, errormsgs

Approval: Triaged


defrecord could tell you if, e.g., you didn't specify an interface before leaping into method bodies.

(defrecord TestRecord [afield bfield cfield] 
  (printc [_] (println cfield)))
ClassCastException clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol  clojure.core/ns-resolve (core.clj:4238)

See http://groups.google.com/group/clojure/browse_thread/thread/f52f90954edd8b09

Comment by Assembla Importer [ 24/Aug/10 12:28 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/405

Comment by Assembla Importer [ 24/Aug/10 12:28 AM ]

stu said: This could be fixed with an assert-valid-defrecord call in core_deftype, similar to assert-valid-fdecl in core.clj. Such a function would also be a place to hang other defrecord error messages.

Generated at Wed Jan 17 22:22:56 CST 2018 using JIRA 4.4#649-r158309.