1.0.24.2: CONSTANTP aware GET-SETF-EXPANDER
[sbcl.git] / tests / setf.impure.lisp
index 0b8a867..cd13d8d 100644 (file)
                    (declare (ignore env))
                    `(set-foo ,foo ,new)))))
 
+;;; Not required by the spec, but allowes compiler-macros for SETF-functiosn
+;;; to see their constant argument forms.
+(with-test (:name constantp-aware-get-setf-expansion)
+  (multiple-value-bind (temps values stores set get)
+      (get-setf-expansion '(foo 1 2 3))
+    (assert (not temps))
+    (assert (not values))
+    (assert (equal `(funcall #'(setf foo) ,@stores 1 2 3) set))
+    (assert (equal '(foo 1 2 3) get))))
+
 ;;; success