unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68113: Wrong error message triggered in cl--generic-standard-method-combination
@ 2023-12-29 16:50 Alan Mackenzie
  2023-12-29 17:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Mackenzie @ 2023-12-29 16:50 UTC (permalink / raw)
  To: 68113; +Cc: Stefan Monnier

Hello, Emacs.

In my development version of Emacs (based on the master branch) I get a
backtrace with the error message being:

    Error: wrong-type-argument (symbolp mets-by-qual)

This occurs during the execution of cl-generic-combine-methods, whose
code starts:

(defun cl--generic-standard-method-combination (generic methods)
  (let ((mets-by-qual ()))
    (dolist (method methods)
      (let ((qualifiers (cl-method-qualifiers method)))
        (if (eq (car qualifiers) :extra) (setq qualifiers (cddr qualifiers)))
        (unless (member qualifiers '(() (:after) (:before) (:around)))
          (error "Unsupported qualifiers in function %S: %S"
                 (cl--generic-name generic) qualifiers))
        (push method (alist-get (car qualifiers) mets-by-qual))))

It is the last line that is signalling the error.  The pertinent line
from the backtrace which is the expansion of that last line reads:

    (let* ((k (car qualifiers)) (p (assq k mets-by-qual)) (v (cons method (cdr p)))) (progn (if p (setcdr p v) (progn (signal 'wrong-type-argument (list 'symbolp 'mets-by-qual)))) v))

..  The error is, in actual fact, the failure to find an entry for (car
qualifiers) in the alist mets-by-qual.  The error message given is
rubbish and more than a little misleading.  mets-by-qual is clearly a
symbol.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-07 19:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-29 16:50 bug#68113: Wrong error message triggered in cl--generic-standard-method-combination Alan Mackenzie
2023-12-29 17:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-30 10:46   ` Alan Mackenzie
2023-12-31 20:01     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-01 19:36       ` Alan Mackenzie
2024-01-02  4:39         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-07 18:52           ` Alan Mackenzie
2024-01-07 19:12             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).