X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/1ec065092f42b4b0be3dcb833f3f5f24451701fd..3ee33e04477ace9d13587f28253fb8c6d1c7ed6c:/src/builtin.lisp diff --git a/src/builtin.lisp b/src/builtin.lisp index 776d3a1..d07f539 100644 --- a/src/builtin.lisp +++ b/src/builtin.lisp @@ -422,19 +422,20 @@ (default (argument-default arg)) (when (or init initargs) (focus-this-class) (let* ((slot-type (sod-slot-type dslot)) - (slot-default (sod-initializer-value init)) (target (format nil "~A.~A" isl (sod-slot-name dslot))) - (initinst (set-from-initializer target - slot-type - slot-default))) + (initinst (and init + (set-from-initializer + target slot-type + (sod-initializer-value init))))) ;; If there are applicable initialization arguments, ;; check to see whether they were supplied. (dolist (initarg (reverse (remove-duplicates initargs :key #'sod-initarg-name - :test #'string=))) + :test #'string= + :from-end t))) (let ((arg-name (sod-initarg-name initarg))) (setf initinst (make-if-inst (format nil "suppliedp.~A" arg-name)