defgeneric, defmethod, and incongruent lambda list... bug?

Paul Nathan pnathan at alumni.uidaho.edu
Tue Aug 9 06:07:21 UTC 2016


Hi,

I have a generic function

(defgeneric equals (a b &rest keys &key recursive key &allow-other-keys)
 ... )

This method works correctly:

(defmethod equals ((a t) (b t) &rest keys)
  (declare (ignore keys))
  (equalp a b))
... )

But, this method throws an error:

(defmethod equals ((a float) (b float)
                   &rest keys
                   &key
                     floating-compare
                     (max-relative-diff 1.19e-7))
... )

My understanding from
http://www.lispworks.com/documentation/HyperSpec/Body/07_fd.htm is that
since &allow-other-keys has been set, this should work.

As a point of reference, SBCL allows this, but of course that is not the
determinant of correctness. :-)


Best regards,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20160808/82ada19c/attachment.html>


More information about the armedbear-devel mailing list