March 29, 2014 [Issue 12488] New: foreach() should accept (and ignore) 'auto' in ForeachType | ||||
---|---|---|---|---|
| ||||
https://d.puremagic.com/issues/show_bug.cgi?id=12488 Summary: foreach() should accept (and ignore) 'auto' in ForeachType Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: ketmar@ketmar.no-ip.org --- Comment #0 from Ketmar Dark <ketmar@ketmar.no-ip.org> 2014-03-28 22:08:00 PDT --- Created an attachment (id=1341) patch against dmd commit 8e2b13b025626127e5e2a0fb90326e655f3deac8 here is the discussion: http://forum.dlang.org/thread/vesvrfaipppwtenleqjr@forum.dlang.org summary: compiler should accept both foreach (v; smth) and foreach(auto v; smth) forms. this can be noncense from compiler writer PoV, but ordinary language user will not be confused by declaring variable without any type. this change will not break any existing code ('auto' is purely optional). patch attached (parser fix and two simple test cases). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 30, 2014 [Issue 12488] foreach() should accept (and ignore) 'auto' in ForeachType | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ketmar Dark | https://d.puremagic.com/issues/show_bug.cgi?id=12488 Ketmar Dark <ketmar@ketmar.no-ip.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ketmar@ketmar.no-ip.org --- Comment #1 from Ketmar Dark <ketmar@ketmar.no-ip.org> 2014-03-30 06:59:19 PDT --- ah, forgot to say that i hereby passing this patch to Public Domain (or licensing it under WTFPL if PD is not working in your country). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation