X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftypep.lisp;h=8c58facaeaeeb1a57c95e193b602b06ed8758a99;hb=b8f63d9b4e978bec3bfc1f4fc471e5ed946781fd;hp=505b55cd350684028a103dc470baafe852198fff;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/typep.lisp b/src/code/typep.lisp index 505b55c..8c58fac 100644 --- a/src/code/typep.lisp +++ b/src/code/typep.lisp @@ -9,9 +9,6 @@ (in-package "SB!KERNEL") -(file-comment - "$Header$") - ;;; The actual TYPEP engine. The compiler only generates calls to this ;;; function when it can't figure out anything more intelligent to do. (defun %typep (object specifier) @@ -117,6 +114,10 @@ (dolist (type (union-type-types type)) (when (%%typep object type) (return t)))) + (cons-type + (and (consp object) + (%%typep (car object) (cons-type-car-type type)) + (%%typep (cdr object) (cons-type-cdr-type type)))) (unknown-type ;; dunno how to do this ANSIly -- WHN 19990413 #+sb-xc-host (error "stub: %%TYPEP UNKNOWN-TYPE in xcompilation host")