mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 05:12:38 -08:00
Warn the user about a type mismatch between the variables in M-V-S-Q and the
type that M-V-S-Q assumes (which is always 'T until we find a better method).
This commit is contained in:
parent
e9133326f7
commit
8d6ffa8edf
1 changed files with 10 additions and 6 deletions
|
|
@ -111,12 +111,16 @@
|
|||
(c1expr `(let* (,@temp-vars)
|
||||
(multiple-value-setq ,vars ,@(second args))
|
||||
,@late-bindings))
|
||||
(dolist (var vars
|
||||
(make-c1form 'MULTIPLE-VALUE-SETQ info (nreverse vrefs)
|
||||
(c1expr (second args))))
|
||||
(setq var (c1vref var))
|
||||
(push var vrefs)
|
||||
(push var (info-changed-vars info)))))
|
||||
(let ((value (c1expr (second args))))
|
||||
(dolist (var vars
|
||||
(make-c1form 'MULTIPLE-VALUE-SETQ info (nreverse vrefs) value))
|
||||
(setq var (c1vref var))
|
||||
(push var vrefs)
|
||||
(unless (type-and 'T (var-type var))
|
||||
(cmpwarn "Variable ~s appeared in a MULTIPLE-VALUE-SETQ and declared to have type ~S."
|
||||
(var-name var)
|
||||
(var-type var)))
|
||||
(push var (info-changed-vars info))))))
|
||||
|
||||
(defun multiple-value-check (vrefs form)
|
||||
(and (rest vrefs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue