mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-25 22:12:40 -08:00
cmp: fix bad warnings for type declarations inside locally
Also search lexical environment for variables instead of only the list of variables being established by the current form (which is nil anyway in the case of locally; only let or multiple-value-bind statements create new variables). The declaration is still ignored, but fixing that would require a much larger refactor because currently variable types are associated to the variable itself. Thus the type can only be set for the full scope in which the variable is active and not locally in some subscope.
This commit is contained in:
parent
977e2fab34
commit
d54c110361
1 changed files with 2 additions and 1 deletions
|
|
@ -176,7 +176,8 @@ special variable declarations, as these have been extracted before."
|
|||
(defun check-vdecl (vnames ts is)
|
||||
(loop for (name . type) in ts
|
||||
unless (or (member name vnames :test #'eq)
|
||||
(symbol-macro-declaration-p name type))
|
||||
(symbol-macro-declaration-p name type)
|
||||
(cmp-env-search-var name))
|
||||
do (cmpwarn "Declaration of type~&~4T~A~&was found for not bound variable ~s."
|
||||
type name))
|
||||
(loop for (name . expected-uses) in is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue