We cannot use :READ-ONLY in the SETF expansions because some code out there modifies the variables.

This commit is contained in:
Juan Jose Garcia Ripoll 2013-05-20 22:48:15 +02:00
parent b2d8477479
commit 0f06c4e85b

View file

@ -358,9 +358,12 @@ Does not check if the third gang is a single-element list."
((try-simpler-expansion place vars vals stores newvalue store-form))
(t
`(let* ,(mapcar #'list vars vals)
(declare (:read-only ,@vars))
;; Unfortunately we cannot do this because there is code out
;; there that changes the variables and values
;; (declare (:read-only ,@vars))
(multiple-value-bind ,stores ,newvalue
(declare (:read-only ,@stores))
;; Same here
;; (declare (:read-only ,@stores))
,store-form))))))
(defun setf-expand (l env)