X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure-cload.lisp;fp=tests%2Fclos.impure-cload.lisp;h=26dd5948e0d6ce4555b423dda0840ecac90e5aa1;hb=efea157110a4db2595f154234641b6768185c307;hp=46f83e609d2436a8e415e6efb922f19e3eac71ee;hpb=0f534f7e3e8298e8acdd2abb8316e50bcfbc1603;p=sbcl.git diff --git a/tests/clos.impure-cload.lisp b/tests/clos.impure-cload.lisp index 46f83e6..26dd594 100644 --- a/tests/clos.impure-cload.lisp +++ b/tests/clos.impure-cload.lisp @@ -119,5 +119,21 @@ (declare (ignore x)) (setq y 'foo))) (style-warning (c) (error c))) +;;; from Axel Schairer on cmucl-imp 2004-08-05 +(defclass class-with-symbol-initarg () + ((slot :initarg slot))) +(defmethod initialize-instance :after + ((x class-with-symbol-initarg) &rest initargs &key &allow-other-keys) + (unless (or (null initargs) + (eql (getf initargs 'slot) + (slot-value x 'slot))) + (error "bad bad bad"))) +(defun make-thing (arg) + (make-instance 'class-with-symbol-initarg 'slot arg)) +(defun make-other-thing (slot arg) + (make-instance 'class-with-symbol-initarg slot arg)) +(assert (eql (slot-value (make-thing 1) 'slot) 1)) +(assert (eql (slot-value (make-other-thing 'slot 2) 'slot) 2)) + ;;; success (sb-ext:quit :unix-status 104)