http://d.puremagic.com/issues/show_bug.cgi?id=5655
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution| |FIXED --- Comment #5 from [email protected] 2013-08-18 22:34:55 PDT --- This bug appears to have been fixed in the latest git HEAD. To prove that it has really been fixed (not just have a different wrong value for i captured), I expanded the code slightly: ------ import std.stdio, std.typetuple; void main() { TypeTuple!(int, float, real) TT; void function() funs[3]; foreach (i, T; TT) { funs[i] = function { writeln(i); }; } funs[1](); funs[2](); } ------ The output is: 1 2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
