unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* #:getter procedure returns unexpected value in GOOPS
@ 2014-04-25 23:24 Diogo F. S. Ramos
  2014-04-26 12:26 ` Neil Jerram
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Diogo F. S. Ramos @ 2014-04-25 23:24 UTC (permalink / raw)
  To: guile-user

When using GOOPS, if a class has a second slot, the #:getter procedure
of the first slot returns the value of the second slot when applied to
an instance of a subclass.

--8<---------------cut here---------------start------------->8---
(use-modules (oop goops))

(define-class <foo> ()
  (a #:init-form 'foo #:getter foo-a)
  (b #:init-form 42))

(define-class <bar> (<foo>)
  (a #:init-form 'bar))
--8<---------------cut here---------------end--------------->8---

  (foo-a (make <foo>)) => foo
  (foo-a (make <bar>)) => 42

I expected:

  (foo-a (make <bar>)) => bar

I'm not too familiar with GOOPS, so I'm not sure this is the right
behavior.

I'm using Guile 2.0.11.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-23 22:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25 23:24 #:getter procedure returns unexpected value in GOOPS Diogo F. S. Ramos
2014-04-26 12:26 ` Neil Jerram
2014-04-26 17:35   ` Diogo F. S. Ramos
2014-04-26 22:19     ` David Pirotte
2014-04-26 22:58       ` Diogo F. S. Ramos
2014-04-27 22:14         ` David Pirotte
2014-04-27  1:15 ` Mark H Weaver
2014-04-27 22:14   ` David Pirotte
2014-04-28  1:12     ` Mark H Weaver
2014-05-02  4:36       ` David Pirotte
2015-03-09 21:58 ` Andy Wingo
2015-04-23 22:56   ` David Pirotte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).