X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=19c91023a532c510a1c6c27d1e11c275bc53903b;hb=5d90b98fff97c81ce1d17ee60d3610a297f4b312;hp=54931c9a6e0a53409ddfcfe624a24cc4677d56cb;hpb=b9915e9a838059473beb4fa03a6410eb8d6b68e3;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 54931c9..19c9102 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -896,7 +896,7 @@ ;;; Siivola. Not all methods for accessing slots are created equal... (defclass yet-another-obsoletion-super () ((obs :accessor obs-of :initform 0))) (defclass yet-another-obsoletion-sub (yet-another-obsoletion-super) ()) -(defmethod shared-initialize :after ((i yet-another-obsoletion-super) +(defmethod shared-initialize :after ((i yet-another-obsoletion-super) slots &rest init) (incf (obs-of i))) @@ -1231,4 +1231,17 @@ (let ((instance (make-instance 'slot-type-subclass))) (setf (slot-value instance 'slot) 3)) +;;; ctors where there's a non-standard SHARED-INITIALIZE method and an +;;; initarg which isn't self-evaluating (kpreid on #lisp 2006-01-29) +(defclass kpreid-enode () + ((slot :initarg not-a-keyword))) +(defmethod shared-initialize ((o kpreid-enode) slots &key &allow-other-keys) + (call-next-method)) +(defun make-kpreid-enode () + (make-instance 'kpreid-enode 'not-a-keyword 3)) +(with-test (:name (:ctor :non-keyword-initarg)) + (let ((x (make-kpreid-enode)) + (y (make-kpreid-enode))) + (= (slot-value x 'slot) (slot-value y 'slot)))) + ;;;; success