Problem with type conflict style warning
syll-dev via Sbcl-help <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
Hello
I don't understand this style warning...
Here is the code (problem with test1 only) :
"
(ql:quickload :alexandria)
(use-package :alexandria)
(defvar *l* '(1 2 3))
(defun test1 ()
(copy-sequence 'vector (reverse *l*)))
(defun test2 ()
(copy-sequence 'vector *l*))
(defun test3 ()
(copy-sequence 'vector '(1 2 3)))
(defun test4 ()
(let ((l '(1 2 3)))
(copy-sequence 'vector l)))
"
And here is the result :
"
; in: DEFUN TEST1
; (COPY-SEQUENCE 'VECTOR (REVERSE *L*))
; --> BLOCK IF COERCE
; ==>
; 1
;
; caught STYLE-WARNING:
; Derived type of SB-C::X is
; (VALUES (OR LIST SB-KERNEL:EXTENDED-SEQUENCE) &OPTIONAL),
; conflicting with its asserted type
; VECTOR.
; See also:
; The SBCL Manual, Node "Handling of Types"
"
sbcl 2.4.1 and 2.4.4 (other versions not tested).
I have the same problem with remove-if-not instead of reverse.
Thank you
syll