http://d.puremagic.com/issues/show_bug.cgi?id=9628
Maxim Fomin <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Maxim Fomin <[email protected]> 2013-03-02 00:27:30 PST --- Rewritten version (this can be complied with -inline): import std.stdio, std.algorithm, std.typetuple, std.range; auto items = [[10, 20], [30]]; void bar() { foreach (int dx; 0 .. 2) { foreach (sub; items) { iota(sub.length) .map!((size_t i){ writeln(dx,"--", sub,"--", items); return 0; }) .array(); }} } void foo() { foreach (int dx; TypeTuple!(0, 1)) { foreach (sub; items) { iota(sub.length) .map!((size_t i){ writeln(dx,"--", sub,"--", items); return 0; }) .array(); }} } void main() { bar(), writeln(), foo(); } dx in second loop is always zero -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
