From c0efffb03a7246a75ab6c8793da758556b213f0d Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 3 Nov 2008 17:23:35 +0000 Subject: [PATCH] 1.0.22.12: fix DEFTYPE regression revealed by ansi tests * DEFTYPE body can be empty. --- src/compiler/deftype.lisp | 2 +- tests/deftype.impure.lisp | 4 ++++ version.lisp-expr | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/deftype.lisp b/src/compiler/deftype.lisp index 6e8fa2d..f488abf 100644 --- a/src/compiler/deftype.lisp +++ b/src/compiler/deftype.lisp @@ -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 ''*) diff --git a/tests/deftype.impure.lisp b/tests/deftype.impure.lisp index 55a1332..373f6d4 100644 --- a/tests/deftype.impure.lisp +++ b/tests/deftype.impure.lisp @@ -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)) diff --git a/version.lisp-expr b/version.lisp-expr index bb5f962..44d80aa 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.22.11" +"1.0.22.12" -- 1.7.10.4