Annoying STYLE-WARNING for defmethod &key

Bug #537711 reported by Faré
8
This bug affects 1 person
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-c::merge-tail-calls 3)
     (sb-c::insert-debug-catch 0)
     (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-next-method)
  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
                            lower (lowerp lower) upper (upperp upper))
  (let ((key (node-key node)))
    (when lowerp
      (assert (< lower key)))
    (when upperp
      (assert (< key upper)))
    (when (left node)
      (check-invariant (left node) :lowerp lowerp :lower lower :upperp t :upper key))
    (when (right node)
      (check-invariant (right node) :lowerp t :lower key :upperp upperp :upper upper))))

Changed in sbcl:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Stas Boukarev (stassats) wrote :

Can't reproduce anymore.

Changed in sbcl:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.