<div class="gmail_quote">On Mon, Aug 30, 2010 at 12:23, Stanislav Blinov <span dir="ltr">&lt;<a href="mailto:blinov@loniir.ru">blinov@loniir.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 30.08.2010 3:06, SK wrote:<div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I encountered this one too and it appears to be a regression in 2.048 that did not occur in 2.047.  It&#39;s the same msg[0] vs. msg.field[0] problem, but in concurrency.d itself.  It&#39;s a one line patch to make this work.<br>

<br>
In /usr/include/d/dmd/phobos/std/concurrency.d, change line 384 to look like this:<br>
<br>
static assert( a1.length != 1 || !is( a1.field[0] == Variant ),<br>
</blockquote></div></div>
</blockquote><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Is that so? I thought ParameterTypeTuple and Tuple are different.<br>

</blockquote></div><br>You&#39;re right, there are different. ParameterTypeTuple is a type tuple (a bunch of types grouped together, with indexing and length, like an array). Tuple is a struct wrapping a type tuple, which can be exposed through the .field member.<br>
<br>In the above line, since a1 is a ParameterTypeTuple, it has no .field member. In effect the expression a1.field[0] == Variant has no meaningful type and so is(...) is always false. Hence, || !is(...) is like || true. It disables the second part of the test.<br>
<br>As for std.concurrency, I never looked at the code before, but the point of receive() seems to do compile-time checking on the matching functions before calling mbox.get( ops ), it&#39;s a good idea to put make the if statement a static if: all other constructs in there are done compile-time, I&#39;d guess.<br>
<br><br><br>Philippe<br><br><br>