From: Nikodemus Siivola Date: Thu, 15 Jan 2009 09:19:31 +0000 (+0000) Subject: 1.0.24.43: DEFTYPE to accept bodies consisting a single symbol X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=1046ddb66edccc3d6aedc7e65180e1abeb38ed4d;p=sbcl.git 1.0.24.43: DEFTYPE to accept bodies consisting a single symbol * Regression from 1.0.22.8, reported by Ariel Badichi. --- diff --git a/NEWS b/NEWS index 1631dc2..460fd62 100644 --- 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 diff --git a/src/compiler/deftype.lisp b/src/compiler/deftype.lisp index 5d20447..fba4c91 100644 --- a/src/compiler/deftype.lisp +++ b/src/compiler/deftype.lisp @@ -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) diff --git a/tests/deftype.impure.lisp b/tests/deftype.impure.lisp index ee43d3b..c260264 100644 --- a/tests/deftype.impure.lisp +++ b/tests/deftype.impure.lisp @@ -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)) diff --git a/version.lisp-expr b/version.lisp-expr index e19dfb1..2ee2588 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".) -"1.0.24.42" +"1.0.24.43"