Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9148/tests
Modified Files:
clos.impure.lisp
Log Message:
0.9.9.10:
Fix a bug in ctor optimization reported by kpreid on #lisp
... quote the ctor-initarg keys in the fallback (unoptimized)
constructor too.
Index: clos.impure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/clos.impure.lisp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- clos.impure.lisp 4 Dec 2005 23:07:13 -0000 1.75
+++ clos.impure.lisp 29 Jan 2006 22:15:27 -0000 1.76
@@ -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
|