From c2d8e70d1be01c1c2cc11efd3905ae3072ff0f1a Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Tue, 28 Sep 2010 12:14:30 +0200 Subject: [PATCH] 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 --- src/cmp/cmpvar.lsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmp/cmpvar.lsp b/src/cmp/cmpvar.lsp index e9138e4ee..87d17c767 100644 --- a/src/cmp/cmpvar.lsp +++ b/src/cmp/cmpvar.lsp @@ -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)))))