[armedbear-devel] Wrongly initialized generic function method combination

Rudolf Schlatte rudi at constantly.at
Mon Aug 13 13:24:58 UTC 2012

On Aug 13, 2012, at 04:25, Stas Boukarev <stassats at gmail.com> wrote:

> When compile a file with
> (defgeneric test (a b)
>  (:method-combination progn :most-specific-last))
> (defmethod test progn (a b)
>  (list a b))
> TEST receives a wrong method-combination
> (mop:generic-function-method-combination #'test)
> =>
> When defgeneric is called, the generic function TEST is already created
> by the defmethod macro at macroexpansion time, but not completely
> initialized, so defgeneric ends up calling reinitialize-instance with
> :method-combination, but the slot for method-combination is
> called %METHOD-COMBINATION and its initarg is :%METHOD-COMBINATION, so
> nothing gets initialized.

Cool.  Adding the proper initarg uncovered bugs in ensure-generic-function-using-class as well.
Should be fixed in #14078.

(The reason for the original commit was that symbols from COMMON-LISP aren't supposed to be used as slot names, which the MOP test suite checks.)


More information about the armedbear-devel mailing list