mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-04-27 11:40:45 -07:00
cmp: check types on coerce-to-vector
This commit is contained in:
parent
604c87126d
commit
088972cace
1 changed files with 2 additions and 0 deletions
|
|
@ -230,6 +230,8 @@ default value of INITIAL-ELEMENT depends on TYPE."
|
|||
(eq (array-element-type object) elt-type))
|
||||
(let* ((final-length (if (eq length '*) (length object) length)))
|
||||
(setf output (make-vector elt-type final-length nil nil nil 0))
|
||||
(unless (eq length '*)
|
||||
(check-type output `(vector ,elt-type (,length)) "coerced object"))
|
||||
(do ((i (make-seq-iterator object) (seq-iterator-next output i))
|
||||
(j 0 (truly-the index (1+ j))))
|
||||
((= j final-length)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue