[Ecls-list] Patch: fix (declare ((some-type) some-variable))

Josh Elsasser josh at elsasser.org
Sat Jan 24 21:07:31 UTC 2009


An assert in the declare handling is wrong, and doesn't account for
declarations of the form (declare ((type) variable)).

diff --git src/cmp/cmpenv.lsp src/cmp/cmpenv.lsp
index 501ed62..e48a532 100644
--- src/cmp/cmpenv.lsp
+++ src/cmp/cmpenv.lsp
@@ -318,7 +318,10 @@
      ((and (consp form) (eq (car form) 'DECLARE))
       (push form all-declarations)
       (dolist (decl (cdr form))
-        (cmpassert (and (proper-list-p decl) (symbolp (first decl)))
+        (cmpassert (and (proper-list-p decl)
+                        (or (symbolp (first decl))
+                            (and (proper-list-p (first decl))
+                                 (symbolp (caar decl)))))
 		   "Syntax error in declaration ~s" form)
 	(let* ((decl-name (first decl))
 	       (decl-args (rest decl)))




More information about the ecl-devel mailing list