(FORMAT NIL "~,1G" 1.4) => "1. "
(FORMAT NIL "~3,1G" 1.4) => "1. "
-20:
- from Marco Antoniotti on cmucl-imp mailing list 1 Mar 2000:
- (defclass ccc () ())
- (setf (find-class 'ccc1) (find-class 'ccc))
- (defmethod zut ((c ccc1)) 123)
- In sbcl-0.7.1.13, this gives an error,
- There is no class named CCC1.
- In sbcl-0.pre8.20, this works, but prints style warnings about
- undefined types.
-
27:
Sometimes (SB-EXT:QUIT) fails with
Argh! maximum interrupt nesting depth (4096) exceeded, exiting
Baumann)
* SB-MOP:ENSURE-CLASS-USING-CLASS now takes its arguments in the
specified-by-AMOP order of (CLASS NAME &REST ARGS &KEY).
+ * fixed bug 20: DEFMETHOD can define methods using names that are
+ not the proper names of classes to designate class specializers.
* fixed some bugs revealed by Paul Dietz' test suite:
** COPY-ALIST now signals an error if its argument is a dotted
list;
'(ignorable))
(t
;; Otherwise, we can make Python very happy.
- `(type ,specializer ,parameter))))
+ (let ((type (info :type :kind specializer)))
+ (ecase type
+ ((:primitive :defined :instance :forthcoming-defclass-type)
+ `(type ,specializer ,parameter))
+ ((nil)
+ `(type ,(class-name (find-class specializer)) ,parameter)))))))
(defun make-method-lambda-internal (method-lambda &optional env)
(unless (and (consp method-lambda) (eq (car method-lambda) 'lambda))
(make-instance 'class-with-all-slots-missing))
'setf))
\f
+;;; we should be able to specialize on anything that names a class.
+(defclass name-for-class () ())
+(defmethod something-that-specializes ((x name-for-class)) 1)
+(setf (find-class 'other-name-for-class) (find-class 'name-for-class))
+(defmethod something-that-specializes ((x other-name-for-class)) 2)
+(assert (= (something-that-specializes (make-instance 'name-for-class)) 2))
+(assert (= (something-that-specializes (make-instance 'other-name-for-class))
+ 2))
+\f
;;;; success
(sb-ext:quit :unix-status 104)
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.pre8.26"
+"0.pre8.27"