From 2deca07b781acdf0214dacf5a7444756dfba6928 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 30 Apr 2003 19:37:09 +0000 Subject: [PATCH] 0.8alpha.0.2: Fix for methods on classes with incomplete subclasses (detected by KMR/McCLIM compilation) ... distilled test for it. --- src/pcl/dfun.lisp | 11 ++--------- tests/clos.impure-cload.lisp | 7 +++++++ version.lisp-expr | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pcl/dfun.lisp b/src/pcl/dfun.lisp index 8ae016d..106708d 100644 --- a/src/pcl/dfun.lisp +++ b/src/pcl/dfun.lisp @@ -1411,11 +1411,7 @@ And so, we are saved. (eq (cadr specl) (cadr type))) (class (or (eq (cadr specl) (cadr type)) - (memq (cadr specl) - (if (eq *boot-state* 'complete) - (class-precedence-list (cadr type)) - (early-class-precedence-list - (cadr type))))))))) + (memq (cadr specl) (cpl-or-nil (cadr type)))))))) (values pred pred)))) (defun saut-prototype (specl type) @@ -1428,10 +1424,7 @@ And so, we are saved. (class-eq (eq (cadr specl) (class-of (cadr type)))) (class (memq (cadr specl) (let ((class (class-of (cadr type)))) - (if (eq *boot-state* 'complete) - (class-precedence-list class) - (early-class-precedence-list - class)))))))) + (cpl-or-nil class))))))) (values pred pred))) (defun specializer-applicable-using-type-p (specl type) diff --git a/tests/clos.impure-cload.lisp b/tests/clos.impure-cload.lisp index cda6eab..d866200 100644 --- a/tests/clos.impure-cload.lisp +++ b/tests/clos.impure-cload.lisp @@ -63,6 +63,13 @@ (defmethod baz ((x specializer1)) x) (assert (typep (baz (make-instance 'specializer1)) 'specializer1)) +;;; ... and from McCLIM, another test case: +(defclass specializer1a (specializer2a specializer2b) ()) +(defclass specializer2a () ()) +(defmethod initialize-instance :after + ((obj specializer2a) &key &allow-other-keys) + (print obj)) + ;;; in a similar vein, we should be able to define methods on classes ;;; that are effectively unknown to the type system: (sb-mop:ensure-class 'unknown-type) diff --git a/version.lisp-expr b/version.lisp-expr index 22de979..dbf48b2 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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.8alpha.0.1" +"0.8alpha.0.2" -- 1.7.10.4