From: Christophe Rhodes Date: Sun, 24 Jul 2011 05:11:40 +0000 (+0100) Subject: fix COERCE to unfinalized extended sequence classes X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=19180214a7fd95ab467020469b7182f5ac62bcde;p=sbcl.git fix COERCE to unfinalized extended sequence classes Just before we're about to create an object, finalize the class if it isn't already finalized, so that we can get at the class prototype. --- diff --git a/NEWS b/NEWS index c331f18..13d8c9d 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ changes relative to sbcl-1.0.50: * bug fix: correct RIP offset calculation in SSE comparison and shuffle instructions. (lp#814688) + * bug fix: COERCE to unfinalized extended sequence classes now works. + (reported by Jan Moringen; lp#815155) changes in sbcl-1.0.50 relative to sbcl-1.0.49: * enhancement: errors from FD handlers now provide a restart to remove diff --git a/src/code/coerce.lisp b/src/code/coerce.lisp index 2fc9ff1..81f27b2 100644 --- a/src/code/coerce.lisp +++ b/src/code/coerce.lisp @@ -241,6 +241,8 @@ ((and (csubtypep type (specifier-type 'sequence)) (find-class output-type-spec nil)) (let ((class (find-class output-type-spec))) + (unless (sb!mop:class-finalized-p class) + (sb!mop:finalize-inheritance class)) (sb!sequence:make-sequence-like (sb!mop:class-prototype class) (length object) :initial-contents object)))