fix COERCE to unfinalized extended sequence classes
authorChristophe Rhodes <csr21@cantab.net>
Sun, 24 Jul 2011 05:11:40 +0000 (06:11 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sun, 24 Jul 2011 05:11:40 +0000 (06:11 +0100)
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
src/code/coerce.lisp

diff --git a/NEWS b/NEWS
index c331f18..13d8c9d 100644 (file)
--- 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
index 2fc9ff1..81f27b2 100644 (file)
         ((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)))