[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
goops: bug or not?
From: |
Anders Vinjar |
Subject: |
goops: bug or not? |
Date: |
24 Jul 2003 22:58:35 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
A question about inheritance of getters/setters and overwriting
and such. The following sequence hits an error (guile v. 1.6):
(define-class <super-1> (<object>)
(sl1 #:init-form 10 #:getter slot))
(define-class <super-2> (<super-1>)
(sl2 #:init-form 100 #:accessor slot))
(define-class <sub-1> (<super-1>)
(sl3 #:init-form 'hey #:getter subslot))
(slot (make <sub-1>))
- claiming theres no applicable method for 'slot in the last
call.
However,
(compute-slots (class-of (make <sub-1>)))
returns:
((sl1 #:init-form 10 #:init-thunk #<procedure #f ()> #:getter #<<generic>
slot (3)>)
(sl3 #:init-form (quote hei) #:init-thunk #<procedure #f ()> #:getter
#<<generic> subslot (1)>))
- indicating there is a generic function 'slot (with 3 methods?) to
access the inherited slot.
But:
(describe slot)
- lists only the two methods for <super-1> and <super-2>
If i leave out the definition of 'slot as an accessor - in
<super-1> - things work as expected with regards to <sub-1>.
Is this a bug? If not, how is a way to access the inherited slot
by the method specified together with the slot?
Anders Vinjar