X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fmethods.lisp;h=d9e2ac84c90ff0090411164bdc8a454411ef6e04;hb=b1a1d1280f0003e0d5af9996274c95a78f188b37;hp=d3186a08f7203a7efc66f5f39a8254876855b854;hpb=11d63973b40deaab9c555bcdab8d5a742c814b48;p=sbcl.git diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index d3186a0..d9e2ac8 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -629,6 +629,22 @@ (defmethod specializer-class ((specializer eql-specializer)) (class-of (slot-value specializer 'object))) +;;; KLUDGE: this is needed to allow for user-defined specializers in +;;; RAISE-METATYPE; however, the list of methods is maintained by +;;; hand, which is error-prone. We can't just add a method to +;;; SPECIALIZER-CLASS, or at least not with confidence, as that +;;; function is used elsewhere in PCL. -- CSR, 2007-05-10 +(defmethod specializer-class-or-nil ((specializer specializer)) + nil) +(defmethod specializer-class-or-nil ((specializer eql-specializer)) + (specializer-class specializer)) +(defmethod specializer-class-or-nil ((specializer class)) + (specializer-class specializer)) +(defmethod specializer-class-or-nil ((specializer class-eq-specializer)) + (specializer-class specializer)) +(defmethod specializer-class-or-nil ((specializer class-prototype-specializer)) + (specializer-class specializer)) + (defun error-need-at-least-n-args (function n) (error 'simple-program-error :format-control "~@