fix interpretation of defsetf lambda lists #348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
of CCL::RENAME-LAMBDA-VARS to come up with a suitable setf
expansion.
https://lists.clozure.com/pipermail/openmcl-devel/2020-September/012217.html
Currently CCL does not expand defsetf lambda lists of the form
(defsetf get-foo (&key (add1 1) (add2 (+ add1 2)))
(data)
`(setq $foo (- ,data ,add1 ,add2)))
(get-setf-expansion '(get-foo))
;; => The value #:ADD1 is not of the expected type NUMBER.
WIP. This patch tries to rectify that. With this patch
(setf (get-foo) 10) ;; should return 6
The patch is for review and doesn't fix indentation and involved the
use of of an unhygenic EXPRESSION symbol. This is to facilitate easy
review.