[armedbear-devel] bug with initialize-instance and keyword arguments

Steve Rolls srolls24 at gmail.com
Wed Oct 7 04:20:23 UTC 2009


Ville Voutilainen wrote:
> 2009/9/26 Ville Voutilainen <ville.voutilainen at gmail.com>:
>   
>> Thanks for the report, we check the initargs for shared-initialize
>> methods, but not for methods of initialize-instance
>> itself. Therefore, we don't find that :x2 initarg (because we only
>> look into shared-initialize methods) and thus the
>> arg check fails. I'll hopefully be able to fix this during the weekend.
>>     
>
> Well, it took a lot longer than I hoped to get into fixing this problem, but
> the fix is committed on trunk, r12178.
>   
Thanks Ville.

There is still at least one case that abcl is not happy with. A keyword 
argument with a default value.

CL-USER(7): (defclass c1() (x))
#<STANDARD-CLASS C1 {34E5190A}>
CL-USER(8): (defmethod initialize-instance :after ((c c1) &key (x2 0)) 
(setf (slot-value c 'x) x2))
#<STANDARD-METHOD INITIALIZE-INSTANCE :AFTER (C1) {70DFB596}>
CL-USER(9): (make-instance 'c1)
#<C1 {39CEFFB8}>
CL-USER(10): (make-instance 'c1 :x2 11)
Debugger invoked on condition of type TYPE-ERROR:
  (X2 0) cannot be coerced to a string.
Restarts:
  0: TOP-LEVEL Return to top level.
[1] CL-USER(11):





More information about the armedbear-devel mailing list