[Openmcl-devel] :default-initargs for ns-object subclasses
Paul Krueger
plkrueger at comcast.net
Wed Jan 2 16:39:33 PST 2013
Is this expected / correct behavior?
? (defclass tst3 (ns:ns-object)
((s1 :accessor s1 :initarg :s1))
(:default-initargs :s1 4)
(:metaclass ns:+ns-object))
#<OBJC:OBJC-CLASS TST3 (#x27D575A0)>
? (slot-boundp (make-instance 'tst3) 's1)
NIL
? (slot-boundp (make-instance 'tst3 :s1 3) 's1)
T
:default-initargs are ignored for initialization of ns:ns-object subclasses. I can do the equivalent slot initialization in an initialize-instance :after method for this class and that works ok, but this behavior surprised me.
I'm running 1.9-dev-r15527M-trunk (DarwinX8664)
More information about the Openmcl-devel
mailing list