projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ebe7c31
)
SETQ signals error if the first argument is not a symbol
author
David
<davazp@debian>
Fri, 21 Feb 2014 19:52:00 +0000
(20:52 +0100)
committer
David
<davazp@debian>
Fri, 21 Feb 2014 19:52:00 +0000
(20:52 +0100)
src/compiler/compiler.lisp
patch
|
blob
|
history
diff --git
a/src/compiler/compiler.lisp
b/src/compiler/compiler.lisp
index
a19b51d
..
d5f0b55
100644
(file)
--- a/
src/compiler/compiler.lisp
+++ b/
src/compiler/compiler.lisp
@@
-440,12
+440,14
@@
(defun setq-pair (var val)
(defun setq-pair (var val)
+ (unless (symbolp var)
+ (error "~a is not a symbol" var))
(let ((b (lookup-in-lexenv var *environment* 'variable)))
(cond
((and b
(let ((b (lookup-in-lexenv var *environment* 'variable)))
(cond
((and b
- (eq (binding-type b) 'variable)
- (not (member 'special (binding-declarations b)))
- (not (member 'constant (binding-declarations b))))
+ (eq (binding-type b) 'variable)
+ (not (member 'special (binding-declarations b)))
+ (not (member 'constant (binding-declarations b))))
`(= ,(binding-value b) ,(convert val)))
((and b (eq (binding-type b) 'macro))
(convert `(setf ,var ,val)))
`(= ,(binding-value b) ,(convert val)))
((and b (eq (binding-type b) 'macro))
(convert `(setf ,var ,val)))