[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50719: Cannot add a no-applicable-method implementation for a generi
From: |
Vivien Kraus |
Subject: |
bug#50719: Cannot add a no-applicable-method implementation for a generic with no method |
Date: |
Tue, 21 Sep 2021 11:42:51 +0200 |
User-agent: |
Evolution 3.34.2 |
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
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#50719: Cannot add a no-applicable-method implementation for a generic with no method,
Vivien Kraus <=