Subject: bug#66342: Quote cl-generic-current-method-specializers

From: Stefan Monnier <[email-masked]>
Date: Fri, 14 Feb 2025 17:16:40 -0500

Hi,

> Currently, cl-generic-current-method-specializers expands into an alist
> of the form ((ARG . TYPE)...).  The patch I provide quotes this so that
> it can serve as a proper sexp.

Interesting.  Out of curiosity, where/how did you bump into this?

> Without quoting, this expansion is a bad sexp that, when evaluated,
> results in an error.

Indeed, it was never meant to be inserted as-is in the macro-expanded
code, instead the idea was that a macro could use

    (macroexpand '(cl-generic-current-method-specializers)
                 macroexpand-all-environment)

to collect type information about the variables to decide how to
generate its code.  This was not very well thought out (e.g. this typing
information may be invalid if the method mutates those vars) and AFAIK
it's never been used anywhere.

Maybe it's best to get rid of it?

        Stefan