From: Christophe R. <cr...@us...> - 2006-08-22 13:23:45
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2735/tests Modified Files: mop.impure.lisp Log Message: 0.9.15.45: Make ENSURE-CLASS and ENSURE-GENERIC-FUNCTION do what AMOP says regarding the :METACLASS and :GENERIC-FUNCTION-CLASS default arguments. I don't like it, but that's what it says, and as Bruno points out on sbcl-devel, no default is right in all circumstances. ... we didn't call ENSURE-CLASS ourselves except as part of DEFCLASS' expansion; we did call ENSURE-GENERIC-FUNCTION, so arrange to call it only when necessary and only with the right :generic-function-class argument. ... while we're at it, fix a bug in ENSURE-CLASS, which got the metaclass wrong if the argument was provided more than once. ... document one or two more small MOP deviations in the manual. Index: mop.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/mop.impure.lisp,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- mop.impure.lisp 19 Jul 2006 20:44:39 -0000 1.35 +++ mop.impure.lisp 22 Aug 2006 13:23:41 -0000 1.36 @@ -513,4 +513,11 @@ (assert (subtypep class2 class1)) (assert (typep (make-instance class2) class1))) +;;; ensure-class got its treatment of :metaclass wrong. +(ensure-class 'better-be-standard-class :direct-superclasses '(standard-object) + :metaclass 'standard-class + :metaclass 'funcallable-standard-class) +(assert (eq (class-of (find-class 'better-be-standard-class)) + (find-class 'standard-class))) + ;;;; success |