[Openmcl-devel] Is this a bug?

Bill St. Clair wws at clozure.com
Tue Feb 7 14:26:52 PST 2017


shared-initialize only initializes UNBOUND slots:

CL-USER> (slot-makunbound foo 'x)
#<FOO #x302000B8CA5D>
CL-USER> (ignore-errors (foo-x foo))
NIL
#<UNBOUND-SLOT #x302000BF27FD>
CL-USER> (shared-initialize foo t)
#<FOO #x302000B8CA5D>
CL-USER> (foo-x foo)
123


On Tue, Feb 7, 2017 at 5:17 PM, Ron Garret <ron at flownet.com> wrote:

> ? (DEFCLASS FOO () ((X :accessor foo-x :INITFORM 123)))
> #<STANDARD-CLASS FOO>
> ? (setf foo (make-instance 'foo))
> #<FOO #x302001F7ABFD>
> ? (foo-x foo)
> 123
> ? (setf (foo-x foo) nil)
> NIL
> ? (foo-x foo)
> NIL
> ? (shared-initialize foo t)          ; I would have expected this to set X
> back to 123
> #<FOO #x302001F2BAAD>
> ? (foo-x foo)
> NIL
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20170207/42470c15/attachment.htm>


More information about the Openmcl-devel mailing list