X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1tran-lambda.lisp;h=efe3a4830380d2f51ad5af0f2ee39155390446d5;hb=d25e3478acccec70402ff32554669a982be8e281;hp=b107a4197ee677c3e2fc10a5c566e9a54692e2f9;hpb=7c406887c08477181e869b1b98142d99b52990ac;p=sbcl.git diff --git a/src/compiler/ir1tran-lambda.lisp b/src/compiler/ir1tran-lambda.lisp index b107a41..efe3a48 100644 --- a/src/compiler/ir1tran-lambda.lisp +++ b/src/compiler/ir1tran-lambda.lisp @@ -33,9 +33,12 @@ (compiler-error "The variable ~S occurs more than once in the lambda list." name)) (let ((kind (info :variable :kind name))) - (when (or (keywordp name) (eq kind :constant)) - (compiler-error "The name of the lambda variable ~S is already in use to name a constant." - name)) + (cond ((or (keywordp name) (eq kind :constant)) + (compiler-error "The name of the lambda variable ~S is already in use to name a constant." + name)) + ((eq :global kind) + (compiler-error "The name of the lambda variable ~S is already in use to name a global variable." + name))) (cond ((eq kind :special) (let ((specvar (find-free-var name))) (make-lambda-var :%source-name name