GNU bug report logs -
#50719
Cannot add a no-applicable-method implementation for a generic with no method
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dear guile,
The following program should just return 'foo, but it enters an
infinite loop:
(use-modules (oop goops))
(define-class <my-generic> (<generic>))
(define-method (no-method (generic <my-generic>) args)
'foo)
(define-method (no-applicable-method (generic <my-generic>) args)
'foo)
(define hello
(make <my-generic>
#:name 'hello))
(hello)
I don’t know GOOPS enough to understand what happens, but when I
slightly change the last line:
(use-modules (oop goops))
(define-class <my-generic> (<generic>))
(define-method (no-method (generic <my-generic>) args)
'foo)
(define-method (no-applicable-method (generic <my-generic>) args)
'foo)
(define hello
(make <my-generic>
#:name 'hello))
(apply-generic hello '())
Now it returns 'foo, as expected. So my guess is that the infinite
loops happens during the memoization phase. More specifically, the no-
applicable-method is called over and over again.
Please find a failing test case attached.
Best regards,
Vivien
[0001-goops-cannot-override-no-applicable-method-for-a-gen.patch (text/x-patch, attachment)]
This bug report was last modified 3 years and 266 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.