;;; Should signal an error
(make-instance (find-class 'sb-mop:standard-direct-slot-definition))
I think the right place to do this check (and others mandated by AMOP, see "Initialization of Slot Definition Metaobjects" at http://www.lisp.org/mop/dictionary.html) is eg. in the primary on either INITIALIZE-INSTANCE (SLOT-DEFINITION).
This is unfortunately the wrong place to fix this. Consider:
;;; Perfectly legal
(defclass foo ()
((name :initarg :name)))
(make-instance 'foo :name nil)
;;; Should signal an error standard- direct- slot-definition ))
(make-instance (find-class 'sb-mop:
I think the right place to do this check (and others mandated by AMOP, see "Initialization of Slot Definition Metaobjects" at http:// www.lisp. org/mop/ dictionary. html) is eg. in the primary on either INITIALIZE-INSTANCE (SLOT-DEFINITION).