Excellent, this works now!


On 30 Nov 2009, at 12:58, Juan Jose Garcia-Ripoll wrote:

On Mon, Nov 30, 2009 at 9:45 AM, Pascal Costanza <pc@p-cos.net> wrote:
If I write this:

(defmethod initialize-instance :around ((gf my-generic-function) &rest args)
 (declare (dynamic-extent args))

Somewhere along the lines the ECL compiler adds the following declarations:

(defmethod initialize-instance :around ((gf my-generic-function) &rest args)
 (declare (type my-generic-function gf)
          (si::no-check-type gf)
          (dynamic-extent args))

At some stage, it then turns the type declaration into (type function gf), because that seems easier to check. However, the si::no-check-type declaration should prevent any type checking on the specified variable. That seems to be fine when dynamic-extent is gone, but when it's there, that doesn't seem to happen anymore.

This bug is fixed in CVS now. As you suspected it was in the part of the compiler that generates automatic type checks for function arguments.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)

Vrije Universiteit Brussel
Software Languages Lab
Pleinlaan 2, B-1050 Brussel, Belgium