(and (symbolp constant)
(not (null (symbol-package constant)))))))
+;;; somewhat akin to DEFAULT-INITARGS (SLOT-CLASS T T), but just
+;;; collecting the defaulted initargs for the call.
+(defun ctor-default-initkeys (supplied-initargs class-default-initargs)
+ (loop for (key nil) in class-default-initargs
+ when (eq (getf supplied-initargs key '.not-there.) '.not-there.)
+ collect key))
\f
;;; *****************
;;; CTORS *********
(member (slot-definition-allocation x)
'(:instance :class)))
(class-slots class))
- (null (check-initargs-1 class (plist-keys (ctor-initargs ctor))
- (append ii-methods si-methods) nil nil))
+ (null (check-initargs-1
+ class
+ (append
+ (ctor-default-initkeys
+ (ctor-initargs ctor) (class-default-initargs class))
+ (plist-keys (ctor-initargs ctor)))
+ (append ii-methods si-methods) nil nil))
(not (around-or-nonstandard-primary-method-p
ii-methods *the-system-ii-method*))
(not (around-or-nonstandard-primary-method-p
(declare (ignore x)) (setq y 'foo)))
(style-warning (c) (error c)))
\f
+;;; ctor optimization bugs:
+;;;
+;;; :DEFAULT-INITARGS not checked for validity
+(defclass invalid-default-initargs ()
+ ((foo :initarg :foo))
+ (:default-initargs :invalid-initarg 2))
+(multiple-value-bind (result condition)
+ (ignore-errors (make-instance 'invalid-default-initargs :foo 1))
+ (assert (null result))
+ (assert (typep condition 'program-error)))
+\f
;;; from Axel Schairer on cmucl-imp 2004-08-05
(defclass class-with-symbol-initarg ()
((slot :initarg slot)))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.18.2"
+"0.8.18.3"