X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fboot.lisp;h=e10af044b0de9139311c73ef7aebab6cbb4863f5;hb=df679ed627975948b1cee190f4d79c397588c43e;hp=bdb2f183ed425486371667af15fda63c073cb500;hpb=7e00a27796fce8eb5b0ab920dda636584a011ba2;p=sbcl.git diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index bdb2f18..e10af04 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -587,13 +587,26 @@ bootstrapping. ;; weirdness when bootstrapping.. -- WHN 20000610 '(ignorable)) (t - ;; Otherwise, we can make Python very happy. + ;; Otherwise, we can usually make Python very happy. (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))))))) + (let ((class (find-class specializer nil))) + (if class + `(type ,(class-name class) ,parameter) + (progn + ;; we can get here, and still not have a failure + ;; case, by doing MOP programming like (PROGN + ;; (ENSURE-CLASS 'FOO) (DEFMETHOD BAR ((X FOO)) + ;; ...)). Best to let the user know we haven't + ;; been able to extract enough information: + (style-warn + "~@" + specializer + 'parameter-specializer-declaration-in-defmethod) + '(ignorable)))))))))) (defun make-method-lambda-internal (method-lambda &optional env) (unless (and (consp method-lambda) (eq (car method-lambda) 'lambda)) @@ -1571,7 +1584,7 @@ bootstrapping. ;;; Keep pages clean by not setting if the value is already the same. (defmacro esetf (pos val) - (let ((valsym (gensym "value"))) + (with-unique-names (valsym) `(let ((,valsym ,val)) (unless (equal ,pos ,valsym) (setf ,pos ,valsym)))))