Annoying STYLE-WARNING for defmethod &key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
When I compile the second of these files after I compiled the first one, I get a STYLE-WARNING: "The function was called with nine arguments, but wants exactly one." at each of the inner calls to check-invariant.
However, if I concatenate these two files into a single one, then I do not get any STYLE-WARNING.
I believe this is a (admittedly minor) bug in SBCL, and there should never be a STYLE-WARNING.
Note: using SBCL 1.0.35.10 on Linux amd64, default features.
;;; interface.lisp
(in-package :cl)
(eval-when (:compile-toplevel :load-toplevel :execute)
(proclaim
#+sbcl
'(optimize
(sb-
(sb-
(speed 3) (space 3) (debug 2))))
(defpackage :bug
(:use :cl))
(in-package :bug)
(defgeneric check-invariant (object &key))
(defmethod check-invariant :around (object &key)
(call-
object)
;;; tree.lisp
(in-package :bug)
(defgeneric node-key (node))
(defclass binary-branch ()
((left
:initarg :left
:initform nil
:reader left)
(right
:initarg :right
:initform nil
:reader right)))
(defmethod check-invariant ((node binary-branch) &key
(let ((key (node-key node)))
(when lowerp
(assert (< lower key)))
(when upperp
(assert (< key upper)))
(when (left node)
(
(when (right node)
(
Changed in sbcl: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Can't reproduce anymore.