src/class-make-{proto,impl}.lisp: Don't make duplicate initargs.
[sod] / src / class-make-impl.lisp
index 5fe9de7..4785d9c 100644 (file)
 ;;; Slot initializers.
 
 (defmethod make-sod-instance-initializer
-    ((class sod-class) nick name value pset &key location)
+    ((class sod-class) nick name value pset &key location inhibit-initargs)
   (with-default-error-location (location)
     (let* ((slot (find-instance-slot-by-name class nick name))
           (initarg-name (get-property pset :initarg :id))
       (with-slots (instance-initializers) class
        (unless (or initarg-name initializer)
          (error "Slot initializer declaration with no effect"))
-       (when initarg-name
+       (when (and initarg-name (not inhibit-initargs))
          (make-sod-slot-initarg-using-slot class initarg-name slot pset
                                            :location location))
        (when initializer