mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 05:43:19 -08:00
Fixed computation of a the values list from a values type: &optional and &rest types must result in an or-type between NULL and the denoted type.
This commit is contained in:
parent
b3b61b59b2
commit
9e5bfb3aa7
1 changed files with 5 additions and 5 deletions
|
|
@ -183,19 +183,19 @@
|
|||
(output '())
|
||||
(n length (1- n)))
|
||||
((or (null l) (zerop n)) (nreverse output))
|
||||
(let ((t (pop l)))
|
||||
(case t
|
||||
(let ((type (pop l)))
|
||||
(case type
|
||||
(&optional
|
||||
(when (null l)
|
||||
(cmperr "Syntax error in type expression ~S" type))
|
||||
(setf t (pop l)))
|
||||
(setf type (pop l)))
|
||||
(&rest
|
||||
(when (null l)
|
||||
(cmperr "Syntax error in type expression ~S" type))
|
||||
(setf t (pop l))
|
||||
(setf type (pop l))
|
||||
(return-from values-type-to-n-types
|
||||
(nreconc output (make-list n :initial-element l)))))
|
||||
(push t output)))))
|
||||
(push type output)))))
|
||||
|
||||
(defun values-type-and (t1 t2)
|
||||
(labels ((values-type-p (type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue