Lisp HUG Maillist Archive

Incorrect warning complaining about unknown initarg to make-instance


When compiling

  (defclass foo ()
    ((slot)))

  (defmethod shared-initialize :after 
      ((obj foo) slot-names &rest initargs &key slot)
    (setf (slot-value obj 'slot) slot))

  (defun quux (x)
    (make-instance 'foo :slot x))

my lispworks-personal-5-1-1-x86-linux signals a warning about :SLOT
being an unknown keyword:

  *** Warning in QUUX: MAKE-INSTANCE 'FOO is called with unknown keyword
      :SLOT

Despite the warning, calling (QUUX 42) does not result in an error.
I.e. Lispworks actually seems to implement CLHS 7.1.2 properly.

The warning seems inappropriate (misleading), though.

  -T.


Updated at: 2020-12-10 08:40 UTC