[cmucl-imp] Method combination woes
    Didier Verna 
    didier at lrde.epita.fr
       
    Mon Jan 29 16:26:40 UTC 2018
    
    
  
  Hello!
It seems that the 2018/02 snapshot of CMUCL doesn't properly handle
method combination updating in generic functions:
CL-USER> (define-method-combination my-min ()
	   ((methods ()))
	   `(min ,@(mapcar #'(lambda (method)
			      `(call-method ,method))
			  methods)))
MY-MIN
CL-USER> (define-method-combination my-max ()
	   ((methods ()))
	   `(max ,@(mapcar #'(lambda (method)
			      `(call-method ,method))
			  methods)))
MY-MAX
CL-USER> (test 0)
5
CL-USER> (reinitialize-instance #'test :method-combination (mop:find-method-combination #'make-instance 'my-max nil))
#<STANDARD-GENERIC-FUNCTION TEST (2) {4AB267B9}>
CL-USER> (test 0)
5
Here, 6 was expected, not 5, and despite the fact that the method
combination slot in the generic function object was correctly updated to
MY-MAX.
Besides, ENSURE-GENERIC-FUNCTION also seems to fail handling
method-combination changes properly:
(ensure-generic-function 'test :method-combination
  (mop:find-method-combination #'make-instance 'my-max nil))
Type-error in KERNEL::OBJECT-NOT-LIST-ERROR-HANDLER:
   #<Method-Combination MY-MAX NIL
     {49C2D605}> is not of type LIST
   [Condition of type TYPE-ERROR]
Comments?
-- 
Resistance is futile. You will be jazzimilated.
Lisp, Jazz, Aïkido: http://www.didierverna.info
    
    
More information about the cmucl-imp
mailing list