1.0.22.12: fix DEFTYPE regression revealed by ansi tests
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 3 Nov 2008 17:23:35 +0000 (17:23 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 3 Nov 2008 17:23:35 +0000 (17:23 +0000)
 * DEFTYPE body can be empty.

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

index 6e8fa2d..f488abf 100644 (file)
@@ -29,7 +29,7 @@
         (if (and (not lambda-list) (not decls) (not (cdr forms))
                  (or (member (car forms) '(t nil))
                      (eq 'quote (caar forms))))
-            (values `(constant-type-expander ,@forms) doc '(sb!c:source-location))
+            (values `(constant-type-expander ,(car forms)) doc '(sb!c:source-location))
             (with-unique-names (whole)
               (multiple-value-bind (macro-body local-decs doc)
                   (parse-defmacro lambda-list whole body name 'deftype :default-default ''*)
index 55a1332..373f6d4 100644 (file)
@@ -27,3 +27,7 @@
 (assert (typep 1 'key))
 (assert (typep 1 'key-singleton))
 
+;;; empty body
+(deftype deftype-with-empty-body ())
+(assert (subtypep 'deftype-with-empty-body nil))
+(assert (subtypep nil 'deftype-with-empty-body))
index bb5f962..44d80aa 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.22.11"
+"1.0.22.12"