1.0.24.43: DEFTYPE to accept bodies consisting a single symbol
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 15 Jan 2009 09:19:31 +0000 (09:19 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 15 Jan 2009 09:19:31 +0000 (09:19 +0000)
 * Regression from 1.0.22.8, reported by Ariel Badichi.

NEWS
src/compiler/deftype.lisp
tests/deftype.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 1631dc2..460fd62 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,8 @@ changes in sbcl-1.0.25 relative to 1.0.24:
     result type VOID. (reported by Ken Olum)
   * bug fix: #235a; sequential inline expasion in different policies no
     longer reuses the functional from the previous expansion site.
+  * bug fix: DEFTYPE no longer breaks on bodies consisting of a single
+    unquoted symbol. Regression from 1.0.22.8. (reported by Ariel Badichi)
 
 changes in sbcl-1.0.24 relative to 1.0.23:
   * new feature: ARRAY-STORAGE-VECTOR provides access to the underlying data
index 5d20447..fba4c91 100644 (file)
@@ -31,7 +31,7 @@
         ;; is not availble early enough.
         (if (and (not lambda-list) (not decls) (not (cdr forms))
                  (or (member (car forms) '(t nil))
-                     (eq 'quote (caar forms))))
+                     (and (consp (car forms)) (eq 'quote (caar forms)))))
             (values `(constant-type-expander ,(car forms)) doc '(sb!c:source-location))
             (with-unique-names (whole)
               (multiple-value-bind (macro-body local-decs doc)
index ee43d3b..c260264 100644 (file)
@@ -44,3 +44,8 @@
 (assert (equal '(x) (sb-int:info :type :lambda-list 'bar)))
 (defclass bar () ())
 (assert (not (sb-int:info :type :lambda-list 'bar)))
+
+;; Need to work with plain symbols as the body.
+(defconstant whatever 't)
+(deftype anything () whatever)
+(assert (typep 42 'anything))
index e19dfb1..2ee2588 100644 (file)
@@ -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".)
-"1.0.24.42"
+"1.0.24.43"