[Issue 4727] Passing std.concurrency.receive() a function of type Variant causes a static assert

2010-08-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4727



--- Comment #2 from Tim Keating itsallaboutthe...@gmail.com 2010-08-25 
21:20:31 PDT ---
Ah, it's an off-by-one error. The index is 0-based, but T.length is 1-based.
That expression should be:

if ( i  T.length-1 )

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4727] Passing std.concurrency.receive() a function of type Variant causes a static assert

2010-08-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4727



--- Comment #3 from Tim Keating itsallaboutthe...@gmail.com 2010-08-25 
21:36:31 PDT ---
... and that if might want to be a static if also. I'm not sure why straight
if wasn't working for me, but it was not successfully evaluating the
comparison, so it would still get into the inner block when i == T.length-1
(confirmed by doing a static assert (i != T.length-1), which failed). Changing
that to a static if seemed to make it work, however.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---