(test-um12 17))
fails with NO-APPLICABLE-METHOD.
-338: "MOP specializers as type specifiers"
- (reported by Bruno Haible sbcl-devel 2004-06-11)
-
- ANSI 7.6.2 says:
- Because every valid parameter specializer is also a valid type
- specifier, the function typep can be used during method selection
- to determine whether an argument satisfies a parameter
- specializer.
-
- however, SBCL's EQL specializers are not type specifiers:
- (defmethod foo ((x (eql 4.0))) 3.0)
- (typep 1 (first (sb-pcl:method-specializers *)))
- gives an error.
-
339: "DEFINE-METHOD-COMBINATION bugs"
(reported by Bruno Haible via the clisp test suite)
enable them.
* the SB-SPROF contrib now works on (most) non-x86 architectures.
It is known as of this release not to work on the Alpha, however.
+ * fixed bug #338: instances of EQL-SPECIFIER are now valid type
+ designators and can hence be used with TYPEP.
* fixed bug #333: CHECK-TYPE now ensures that the type error
signalled, if any, has the right object to be accessed by
TYPE-ERROR-DATUM. (reported by Tony Martinez)
(defmethod shared-initialize :after ((specl eql-specializer) slot-names &key)
(declare (ignore slot-names))
- (setf (slot-value specl 'type) `(eql ,(specializer-object specl))))
+ (setf (slot-value specl 'type)
+ `(eql ,(specializer-object specl)))
+ (setf (info :type :translator specl)
+ (constantly (make-member-type :members (list (specializer-object specl))))))
+
\f
(defun real-load-defclass (name metaclass-name supers slots other)
(let ((res (apply #'ensure-class name :metaclass metaclass-name
(xs (class-direct-subclasses x)))
(assert (>= (length xs) 1))
(assert (member (find-class 'logical-pathname) xs)))
+
+;;; BUG 338: "MOP specializers as type specifiers"
+;;; (reported by Bruno Haible sbcl-devel 2004-06-11)
+(let* ((m (defmethod eql-specialized-method ((x (eql 4.0))) 3.0))
+ (spec (first (sb-mop:method-specializers m))))
+ (assert (not (typep 1 spec)))
+ (assert (typep 4.0 spec)))
\f
;;;; success
(sb-ext:quit :unix-status 104)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.12.9"
+"0.8.12.10"