[Ecls-list] ContextL functions with &key args don't work properly in ECL.

Alexander Gavrilov angavrilov at gmail.com
Wed Feb 24 17:51:51 UTC 2010


Hi,

Using the following definition:

(define-layered-function foo (a &key)
  (:method (a &key)
    (print a))
  (:method ((a number) &key b)
    (call-next-layered-method)
    (print b)))

in the following way doesn't work:

(foo 5 :b 5)

because the base method complains about an unknown key.

This is incorrect because a key is valid if any of the applicable
methods accepts it. Moreover, it breaks even if &allow-other-keys
is added to the generic function parameter list (but not to the
methods). The standard defmethod implementation in ECL
supports this by adding &allow-other-keys to the method
function lambdas, but CloserMOP doesn't do it.

Also, even with (debug 3) layered method calls appear in the
stack trace as useless uninterned symbols.

Alexander




More information about the ecl-devel mailing list