Subject: bug#50608: ,trace (method ()) --> no applicable method for ...

From: Maxime Devos <[email-masked]>
Date: Wed, 15 Sep 2021 21:04:04 +0200

Hi guile,

Try running the following from a repl:

(use-modules (oop goops))
(method ())
;; --> $1 = #<<method> () 7fbb1bcb47c0>
,trace (method ())
--->
[...]
trace: |  |  (_ #<<class> <method> 7fbb1bc67c80> (#:specializers () #:formals () #:body ((if #f …)) …))
trace: |  |  |  (struct-ref/unboxed #<<class> <method> 7fbb1bc67c80> 5)
trace: |  |  |  6
trace: |  |  |  (allocate-struct #<<class> <method> 7fbb1bc67c80> 6)
trace: |  |  |  While executing meta-command:
No applicable method for #<<generic> slot-missing (3)> in call (slot-missing #<<class> <boolean> 7fbb1bc67180> #f name)

The issue is that an instance of <method> is being written to
a port before it has been initialised, which various procedures in
(oop goops) don't expect.

I'll send a patch to [email-masked] with a fix for <method>
and some other classes.

Greetings,
Maxime.