Skip to content

ccl:find-definition-sources on SETF generic function methods #548

Description

@melisgl

Compile this file:

(defgeneric foo (x)
  (:method ((x string))
    x))

(defgeneric (setf bar) (x)
  (:method ((x string))
    x))

Then:

CL-USER> (ccl:find-definition-sources 'foo)
(((#<FUNCTION-DEFINITION-TYPE FUNCTION #x30200027113D> . FOO) #<SOURCE-NOTE "/tmp/fileMAwbyK":0-51 "(defgeneric foo (x) (:method ((x string)) x))"> #<SOURCE-NOTE "/tmp/file9PVl1B":17-68 "(defgeneric foo (x) (:method ((x string)) x))">) ((#<METHOD-DEFINITION-TYPE METHOD #x30200026F8FD> . #<STANDARD-METHOD FOO (STRING)>) #<SOURCE-NOTE "/tmp/fileMAwbyK":22-50 "(:method ((x string)) x)"> #<SOURCE-NOTE "/tmp/file9PVl1B":39-67 "(:method ((x string)) x)">))

CL-USER> (ccl:find-definition-sources '(setf bar))
(((#<FUNCTION-DEFINITION-TYPE FUNCTION #x30200027113D> SETF BAR) #<SOURCE-NOTE "/tmp/fileStByDY":53-111 "(defgeneric (setf bar) (x) (:method ((x string)) x))"> #<SOURCE-NOTE "/tmp/filetQjCks":70-128 "(defgeneric (setf bar) (x) (:method ((x string)) x))">))

The method of foo is found but not the method of (setf bar).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions