GNU bug report logs - #54079
29.0.50; Method dispatching eratically fails

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Mon, 21 Feb 2022 00:14:02 UTC

Severity: normal

Found in version 29.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 54079 <at> debbugs.gnu.org
Subject: bug#54079: 29.0.50; Method dispatching eratically fails
Date: Sun, 20 Feb 2022 22:16:25 -0500
Michael Heerdegen [2022-02-21 01:12:56] wrote:
> I extended register.el with new register content types.  This involves a
> lot of method definitions like
>
>   (cl-defmethod register-val-jump-to ((val TYPE) arg))
>
> where TYPE refers to some of my self defined container types for
> register contents.

Can you show the actual code (the bodies of the `cl-defmethod`s aren't
important, but the TYPE part could, or maybe if they're inside something
else (maybe an `eval-and-compile` or something like that?))?

How is the type defined?  `cl-defstruct`?  `defclass`?

> My problem: the dispatching of these methods is often erratically
> broken.  The methods then are not used although their type should match.
> The according test for VAL being of the TYPE, e.g. by using the
> according type predicate, succeeds.

What does `type-of` return on VAL?


        Stefan





This bug report was last modified 3 years and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.