From baaab018410a6fd31f77840816e32905c62ec413 Mon Sep 17 00:00:00 2001 From: Daniel Kochmanski Date: Wed, 16 Aug 2017 22:05:35 +0200 Subject: [PATCH] seq: remove bogus check-type's We assume, that *our* make-vector will return vector of correct length, no need to revalidate that. Also these checks are bogus and never could have worked, because type specifiers were malformed. Preserving the checks would require making coerce-to-vector a macro, which expands typespecifier. Fixes #400. --- src/lsp/seq.lsp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lsp/seq.lsp b/src/lsp/seq.lsp index e65d879bd..af491d5f9 100644 --- a/src/lsp/seq.lsp +++ b/src/lsp/seq.lsp @@ -230,17 +230,12 @@ 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) (setf object output)) (declare (index j)) (setf (aref output j) (seq-iterator-ref object i))))) - (unless (eq length '*) - (unless (= length (length output)) - (check-type output `(vector ,elt-type (,length)) "coerced object"))) output)) (defun concatenate (result-type &rest sequences)