[armedbear-devel] Wrongly initialized generic function method combination

Stas Boukarev stassats at gmail.com
Mon Aug 13 02:25:54 UTC 2012


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.

This was changed in the following commit:
http://trac.common-lisp.net/armedbear/changeset?new=13947%40trunk%2Fabcl%2Fsrc%2Forg%2Farmedbear%2Flisp%2FStandardGenericFunctionClass.java&old=13871%40trunk%2Fabcl%2Fsrc%2Forg%2Farmedbear%2Flisp%2FStandardGenericFunctionClass.java

-- 
With best regards, Stas.




More information about the armedbear-devel mailing list