The following does not emit a compiler-note
(deftype list-of-length (n &optional type) (if (zerop n) `null `(cons ,type (list-of-length ,(1- n)))))
(declaim (ftype (function (t t) (list-of-length 2)) bar)) (defun bar (x y) (list x y))
(defun foo () (destructuring-bind (x y z) (bar 1 2) (list :x x :y y :z z)))
The reason is lacking compiler-smartness for sb-int:proper-list-of-length-p.
(When fixing this, the changset from 1.0.19.30 may have to be reconsidered.)
The following does not emit a compiler-note
(deftype list-of-length (n &optional type)
(if (zerop n)
`null
`(cons ,type (list-of-length ,(1- n)))))
(declaim (ftype (function (t t) (list-of-length 2)) bar))
(defun bar (x y)
(list x y))
(defun foo () ing-bind (x y z) (bar 1 2)
(destructur
(list :x x :y y :z z)))
The reason is lacking compiler-smartness for sb-int: proper- list-of- length- p.
(When fixing this, the changset from 1.0.19.30 may have to be reconsidered.)