X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fdeftype.lisp;h=370852556b1ad7f65a10e9aa1bfa360d63a4f3ae;hb=4ba392170e98744f0ef0b8e08a5d42b988f1d0c9;hp=fba4c91f2017a65430f9df427bcf0e5c10695cb0;hpb=1046ddb66edccc3d6aedc7e65180e1abeb38ed4d;p=sbcl.git diff --git a/src/compiler/deftype.lisp b/src/compiler/deftype.lisp index fba4c91..3708525 100644 --- a/src/compiler/deftype.lisp +++ b/src/compiler/deftype.lisp @@ -19,11 +19,12 @@ (defun %deftype (name) (setf (classoid-cell-pcl-class (find-classoid-cell name :create t)) nil)) -(def!macro sb!xc:deftype (name lambda-list &body body) +(def!macro sb!xc:deftype (&whole form name lambda-list &body body) #!+sb-doc "Define a new type, with syntax like DEFMACRO." (unless (symbolp name) - (error "type name not a symbol: ~S" name)) + (bad-type name 'symbol "Type name is not a symbol:~% ~S" + form)) (multiple-value-bind (expander-form doc source-location-form) (multiple-value-bind (forms decls doc) (parse-body body) ;; FIXME: We could use CONSTANTP here to deal with slightly more