On Aug 13, 2012, at 04:25, Stas Boukarev stassats@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) => #<METHOD-COMBINATION STANDARD {6E99175D}>
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.)
Rudi