[Openmcl-devel] defmethod congruency checks
pc at p-cos.net
Fri Sep 18 09:43:52 UTC 2009
Clozure Common Lisp seems to be too eager in its checking of
congruency of generic function lambda lists and those of their methods.
Consider the following example:
? (defgeneric foo (a b c))
#<STANDARD-GENERIC-FUNCTION FOO #x30004125B93F>
:specializers (list (find-class 't) (find-class 't) (find-class
:lambda-list '(a b c)
:function (lambda (&rest args) (print args))))
> Error: Lambda list of method #<STANDARD-METHOD NIL (T T T)>
> is incompatible with that of the generic function FOO.
> Method's lambda-list : (A B C)
> Generic-function's : (A B C)
> While executing: CCL::CHECK-DEFMETHOD-CONGRUENCY, in process
Indeed, check-defmethod-congruency uses the method-function to check
for congruency, while it should actually use method-lambda-list for
that purpose (at least in non-standard cases).
As far as I can tell at the moment, this is the only remaining step so
that I can provide compatibility in Closer to MOP of the generic
function invocation protocol to the specification in AMOP.
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel
Software Languages Lab
Pleinlaan 2, B-1050 Brussel, Belgium
More information about the Openmcl-devel