mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 05:43:19 -08:00
ECL did not understand type declarations that involved symbol macros.
This commit is contained in:
parent
a0ca4fcb82
commit
efe893efe7
2 changed files with 11 additions and 1 deletions
|
|
@ -28,6 +28,8 @@ ECL 10.3.2:
|
|||
- ecl_make_file_stream_from_fd() did not set the right mode in the stream
|
||||
structure.
|
||||
|
||||
- ECL did not understand type declarations that involved symbol macros.
|
||||
|
||||
* Visible changes:
|
||||
|
||||
- The source location annotator records the original pathnames, not the
|
||||
|
|
|
|||
|
|
@ -484,9 +484,17 @@
|
|||
(c1add-declarations decls)
|
||||
(c2expr body)))
|
||||
|
||||
(defun symbol-macrolet-declaration-p (name type)
|
||||
(let* ((record (assoc name (cmp-env-variables *cmp-env*))))
|
||||
(when (eq (second record) 'si::symbol-macro)
|
||||
(let ((expression (macroexpand-1 name *cmp-env*)))
|
||||
(cmp-env-register-symbol-macro name `(the ,type ,expression)))
|
||||
t)))
|
||||
|
||||
(defun check-vdecl (vnames ts is)
|
||||
(loop for (var . type) in ts
|
||||
unless (member var vnames :test #'eq)
|
||||
unless (or (member var vnames :test #'eq)
|
||||
(symbol-macrolet-declaration-p var type))
|
||||
do (cmpwarn "Declaration of type~&~4T~A~&was found for not bound variable ~s."
|
||||
type var))
|
||||
(loop for (var . expected-uses) in is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue