In LET/LET* forms, a local binding did not shadow a special variable binding.

> (defun test ()
   (let ((a 5))
     (declare (special a))
     (flet ((x () a))
       (let ((a 10))
         (x)))))
> (test)
5
> (compile 'test)
> (test)
10
This commit is contained in:
Juan Jose Garcia Ripoll 2010-09-28 12:14:30 +02:00
parent 0180c8b0a7
commit c2d8e70d1b

View file

@ -140,7 +140,7 @@
(defun special-variable-p (name)
(or (si::specialp name)
(check-global name)
(let ((v (cmp-env-search-var name)))
(let ((v (cmp-env-search-var name *cmp-env-root*)))
;; Fixme! Revise the declamation code to ensure whether
;; we also have to consider 'GLOBAL here.
(and v (eq (var-kind v) 'SPECIAL)))))