Skip to content

defsetf is always expanded with keyword arguments present even when not passed by the user #551

@dkochmanski

Description

@dkochmanski

context: https://codeberg.org/McCLIM/McCLIM/issues/1162

repro:

(DEFSETF MY-POINT-POSITION
    (POINT &KEY ((:COORDINATES COORDINATES) NIL G7615))
    (NX NY)
  (LET ((FUN-OPTS7613 (APPEND))
        (FUN-KEYS7614 (APPEND (AND G7615 `(:COORDINATES ,COORDINATES)))))
    `(format t "(setf) ~s~%" (list ,nx ,ny ,point ,@FUN-OPTS7613 ,@FUN-KEYS7614))))

ccl:

> (setf (my-point-position 42) (values 1 2))
(setf) (1 2 42 :COORDINATES NIL)

ecl, sbcl, lw

CL-USER> (setf (my-point-position 42) (values 1 2))
(setf) (1 2 42)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions