unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Diogo F. S. Ramos" <dfsr@riseup.net>
To: 17355@debbugs.gnu.org
Subject: bug#17355: #:getter procedure returns unexpected value in GOOPS
Date: Sat, 26 Apr 2014 22:43:41 -0300	[thread overview]
Message-ID: <871twjh7hu.fsf@nebulosa.milkyway> (raw)

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 using Guile 2.0.11.





             reply	other threads:[~2014-04-27  1:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-27  1:43 Diogo F. S. Ramos [this message]
2016-06-21 13:12 ` bug#17355: #:getter procedure returns unexpected value in GOOPS Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871twjh7hu.fsf@nebulosa.milkyway \
    --to=dfsr@riseup.net \
    --cc=17355@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).