On Mon, Nov 30, 2009 at 9:45 AM, Pascal Costanza <span dir="ltr"><<a href="mailto:pc@p-cos.net">pc@p-cos.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If I write this:<br>
<br>
(defmethod initialize-instance :around ((gf my-generic-function) &rest args)<br>
  (declare (dynamic-extent args))<br>
  ...)<br>
<br>
Somewhere along the lines the ECL compiler adds the following declarations:<br>
<br>
(defmethod initialize-instance :around ((gf my-generic-function) &rest args)<br>
  (declare (type my-generic-function gf)<br>
           (si::no-check-type gf)<br>
           (dynamic-extent args))<br>
  ...)<br>
<br>
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.<br>
</blockquote></div><br>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.<br><br>Juanjo<br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>
c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>