The short form of DEFSETF requires the second argument to be a
symbol. Added the appropriate check and a test case.
See also the section 5.3 in CLHS.
Patch by Roman Marynchak.
#!+sb-doc
"Associates a SETF update function or macro with the specified access
function or macro. The format is complex. See the manual for details."
- (cond ((not (listp (car rest)))
+ (cond ((and (not (listp (car rest))) (symbolp (car rest)))
`(eval-when (:load-toplevel :compile-toplevel :execute)
(assign-setf-macro ',access-fn
nil
(assert (equal `(funcall #'(setf foo) ,@stores 1 2 3) set))
(assert (equal '(foo 1 2 3) get))))
+(with-test (:name :update-fn-should-be-a-symbol-in-defsetf)
+ (assert (eq :error
+ (handler-case
+ (eval '(defsetf access-fn 5))
+ (error ()
+ :error)))))
+
;;; success
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.43.58"
+"1.0.43.59"