1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-04 03:00:20 +02:00
guile/module/oop
Andy Wingo 5b7632331e Fix #:init-value on class-allocated slots
Allocating an instance of a class with a #:class or #:each-subclass slot
allocation should not re-initialize the class-allocated slot.  In Guile
1.8, this worked by effectively doing a slot-bound? within
%initialize-object.  In Guile 2.0 we instead initialize the slot when it
is allocated -- in compute-get-n-set.

* module/oop/goops.scm (compute-getters-n-setters): Don't set an
  init-thunk for class-allocated slots.
  (compute-get-n-set): Initialize class-allocated slots here, if an
  init-thunk or init-value are present.

* test-suite/tests/goops.test ("#:each-subclass"): Add test.
2015-01-22 12:40:43 +01:00
..
goops Improve correctness and consistency of 'eval-when' usage. 2014-01-23 10:41:22 -05:00
ChangeLog-2008 move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
goops.scm Fix #:init-value on class-allocated slots 2015-01-22 12:40:43 +01:00