X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcross-type.lisp;h=730a764e026ee36ccdf674109fa4c3966af8993d;hb=07ab1e4811ab16f95a9a5e8d767426a0787f22c0;hp=0ac13c9d52e46e120b36f20372daca42a1c0d46c;hpb=cd8fe50554652680dde36396d7862fc6cc83839c;p=sbcl.git diff --git a/src/code/cross-type.lisp b/src/code/cross-type.lisp index 0ac13c9..730a764 100644 --- a/src/code/cross-type.lisp +++ b/src/code/cross-type.lisp @@ -162,6 +162,14 @@ (target-type-is-in '(array simple-string simple-vector string vector)) (values (typep host-object target-type) t)) + (;; sequence is not guaranteed to be an exhaustive + ;; partition, but it includes at least lists and vectors. + (target-type-is-in '(sequence)) + (if (or (vectorp host-object) (listp host-object)) + (values t t) + (if (typep host-object target-type) + (warn-and-give-up) + (values nil t)))) (;; general cases of vectors (and (not (hairy-type-p (values-specifier-type target-type))) (sb!xc:subtypep target-type 'cl:vector)) @@ -348,7 +356,7 @@ ;; call TYPE=, that in turn may call CTYPEP). Until then, pick a few ;; cherries off. (cond ((member-type-p ctype) - (if (member obj (member-type-members ctype)) + (if (member-type-member-p obj ctype) (values t t) (values nil t))) ((union-type-p ctype)