X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcross-type.lisp;h=fee5884319eac9e76fecc71c62d2ef10787df61c;hb=a682f4c392bc874a6a898632889319ebdd8821fc;hp=0ac13c9d52e46e120b36f20372daca42a1c0d46c;hpb=39e19255f69cbba8668b4b7ffa58532ab6309375;p=sbcl.git diff --git a/src/code/cross-type.lisp b/src/code/cross-type.lisp index 0ac13c9..fee5884 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))