X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-type.lisp;h=dbeff6a927e15d325a290a74ca443f44f5e1abb0;hb=0b5610d8a220a4b20cbeac958953ca4d67c00038;hp=1b8252516008955ffc25bf77ccbc51b148f3ab9a;hpb=8624c52d7620e8a4d3de23c363e843a10815f4f4;p=sbcl.git diff --git a/src/code/late-type.lisp b/src/code/late-type.lisp index 1b82525..dbeff6a 100644 --- a/src/code/late-type.lisp +++ b/src/code/late-type.lisp @@ -128,7 +128,8 @@ ;;;; also be annotated with function or values types. ;;; the description of a keyword argument -(defstruct (key-info #-sb-xc-host (:pure t)) +(defstruct (key-info #-sb-xc-host (:pure t) + (:copier nil)) ;; the keyword (name (required-argument) :type keyword) ;; the type of the argument value @@ -772,10 +773,24 @@ (!def-type-translator not (&whole whole type) (declare (ignore type)) + ;; Check legality of arguments. + (destructuring-bind (not typespec) whole + (declare (ignore not)) + (specifier-type typespec)) ; must be legal typespec + ;; Create object. (make-hairy-type :specifier whole)) (!def-type-translator satisfies (&whole whole fun) (declare (ignore fun)) + ;; Check legality of arguments of arguments. + (destructuring-bind (satisfies predicate-name) whole + (declare (ignore satisfies)) + (unless (symbolp predicate-name) + (error 'simple-type-error + :datum predicate-name + :expected-type symbol + :format-control "~S is not a symbol." + :format-arguments (list predicate-name)))) (make-hairy-type :specifier whole)) ;;;; numeric types