GNU bug report logs - #17355
#:getter procedure returns unexpected value in GOOPS

Previous Next

Package: guile;

Reported by: "Diogo F. S. Ramos" <dfsr <at> riseup.net>

Date: Sun, 27 Apr 2014 04:54:01 UTC

Severity: important

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Diogo F. S. Ramos" <dfsr <at> riseup.net>
To: 17355 <at> debbugs.gnu.org
Subject: bug#17355: #:getter procedure returns unexpected value in GOOPS
Date: Sat, 26 Apr 2014 22:43:41 -0300
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.




This bug report was last modified 8 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.