ECL did not understand type declarations that involved symbol macros.

This commit is contained in:
Juan Jose Garcia Ripoll 2010-03-28 20:11:20 +02:00
parent a0ca4fcb82
commit efe893efe7
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -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