[armedbear-ticket] [armedbear] #242: Unused &key arguments in defmethod forms should not cause style-warnings

armedbear armedbear-devel at common-lisp.net
Sun Aug 26 17:46:05 UTC 2012


#242: Unused &key arguments in defmethod forms should not cause style-warnings
-----------------------+----------------------------------------------------
 Reporter:  rschlatte  |       Owner:  ehuelsmann
     Type:  defect     |      Status:  new       
 Priority:  minor      |   Milestone:            
Component:  compiler   |     Version:            
 Keywords:             |  
-----------------------+----------------------------------------------------

Comment(by rschlatte):

 Pascal Costanza, the original reporter, commented on armedbear-devel
 (August 26 2012, "Re: warnings for method keywords (was Re: Closer-mop
 support for ABCL)"):

 This is not the part I'm referring to. It's rather this one: "The set of
 keyword arguments accepted by the generic function for a particular call
 is the union of the keyword arguments accepted by all applicable methods
 and the keyword arguments mentioned after &keyin the generic function
 definition, if any."

 To illustrate: Assume the following definitions.

 {{{
 (defgeneric foo (x y z &key a b c))

 (defmethod foo ((x my-class) y z &key a b c d)
  (+ y z a b c))
 }}}

 If you invoke foo on an instance of my-class, the keyword parameter :d is
 accepted, although it is not used inside the body. This can be important,
 depending on circumstances (for example, when implementing specifications
 that require certain keywords to be accepted, as is the case for the CLOS
 MOP).

 However, you seem to agree to drop the style warning, so that's ok… ;)

-- 
Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/242#comment:2>
armedbear <http://common-lisp.net/project/armedbear>
armedbear


More information about the armedbear-ticket mailing list