1.0.13.47: spurious INLINE declaration for (SETF FOO) from typed DEFSTRUCT
[sbcl.git] / src / code / defstruct.lisp
index 0fb2b36..26b5058 100644 (file)
           (let ((inherited (accessor-inherited-data name defstruct)))
             (cond
               ((not inherited)
-               (stuff `(declaim (inline ,name (setf ,name))))
+               (stuff `(declaim (inline ,name ,@(unless (dsd-read-only slot)
+                                                        `((setf ,name))))))
                ;; FIXME: The arguments in the next two DEFUNs should
                ;; be gensyms. (Otherwise e.g. if NEW-VALUE happened to
                ;; be the name of a special variable, things could get