https://issues.dlang.org/show_bug.cgi?id=21272
Issue ID: 21272 Summary: Overzealous and inconsistent foreach shadowing deprecations for nested functions Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: dlang-bugzi...@thecybershadow.net ////////////////// test.d ////////////////// void fun() { int var1, var2, var3; void gun() { int var1; // OK? int[] arr; foreach (i, var2; arr) {} // OK? int[int] aa; foreach (k, var3; aa) {} // Not OK?? } } //////////////////////////////////////////// Introduced in https://github.com/dlang/dmd/pull/10404 --