From 19180214a7fd95ab467020469b7182f5ac62bcde Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sun, 24 Jul 2011 06:11:40 +0100 Subject: [PATCH] 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. --- NEWS | 2 ++ src/code/coerce.lisp | 2 ++ 2 files changed, 4 insertions(+) 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))) -- 1.7.10.4