Comment 2 for bug 942237

Revision history for this message
Christophe Rhodes (csr21-cantab) wrote : Re: [Bug 942237] Re: FILTER-DOLIST-DECLARATIONS braindamaged

Also, it is never incorrect to delete declarations, other than (optimize
safety) and (special ...), because in all other cases implementations
are allowed to ignore them.

I'd be fine with not removing the declarations; that will mean that all
user code which tries to declare the type of a dolist iteration variable
would instead have to do e.g.

  (dolist (s list 'foo)
    (let ((s s))
      (declare (string s))
      ...))

which strictly speaking is necessary for actual conforming code.

Christophe