[Issue 6652] foreach parameter with number range is always ref

2013-11-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Martin Nowak c...@dawg.eu changed: What|Removed |Added CC||la...@virginia.edu ---

[Issue 6652] foreach parameter with number range is always ref

2013-03-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #28 from github-bugzi...@puremagic.com 2013-03-06 21:32:07 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6652] foreach parameter with number range is always ref

2013-03-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

[Issue 6652] foreach parameter with number range is always ref

2013-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6652] foreach parameter with number range is always ref

2013-01-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #26 from github-bugzi...@puremagic.com 2013-01-24 09:56:33 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6652] foreach parameter with number range is always ref

2012-11-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #25 from github-bugzi...@puremagic.com 2012-11-13 14:38:59 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6652] foreach parameter with number range is always ref

2012-11-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #24 from bearophile_h...@eml.cc 2012-11-03 07:06:12 PDT --- See also: http://forum.dlang.org/thread/znbtczbgipqqzllaf...@forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You

[Issue 6652] foreach parameter with number range is always ref

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #23 from Kenji Hara k.hara...@gmail.com 2012-11-02 21:12:30 PDT --- *** Issue 6214 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are

[Issue 6652] foreach parameter with number range is always ref

2012-06-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #22 from d...@dawgfoto.de 2012-06-22 07:37:40 PDT --- Commits pushed to master Great. So what's the time frame until deprecation, 6 month? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You

[Issue 6652] foreach parameter with number range is always ref

2012-06-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #19 from Kenji Hara k.hara...@gmail.com 2012-06-21 08:32:51 PDT --- (In reply to comment #18) How about? Sounds great. It doesn't break code and allows us to fix this finally. foreach (i, item; array) Yeah, it should apply to

[Issue 6652] foreach parameter with number range is always ref

2012-06-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #20 from Kenji Hara k.hara...@gmail.com 2012-06-21 08:35:11 PDT --- (In reply to comment #19) (In reply to comment #18) How about? Sounds great. It doesn't break code and allows us to fix this finally. foreach (i, item;

[Issue 6652] foreach parameter with number range is always ref

2012-06-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #21 from github-bugzi...@puremagic.com 2012-06-21 14:21:51 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6652] foreach parameter with number range is always ref

2012-06-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #18 from d...@dawgfoto.de 2012-06-19 06:10:15 PDT --- How about? Sounds great. It doesn't break code and allows us to fix this finally. foreach (i, item; array) Yeah, it should apply to the index variable as well. -- Configure

[Issue 6652] foreach parameter with number range is always ref

2012-06-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #17 from bearophile_h...@eml.cc 2012-06-17 15:31:45 PDT --- Just a note. void main() { import std.stdio; auto array = [10, 20, 30, 40, 50]; foreach (i, item; array) { writeln(item); i++; } }

[Issue 6652] foreach parameter with number range is always ref

2012-06-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #12 from bearophile_h...@eml.cc 2012-06-16 05:07:21 PDT --- (In reply to comment #10) They are the phases to change behavior. I see. I think we should allow modifying loop variable in foreach body, but it should not affect to

[Issue 6652] foreach parameter with number range is always ref

2012-06-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #13 from bearophile_h...@eml.cc 2012-06-16 05:14:39 PDT --- If phase 3 will be accepted, I hope this syntax too will be accepted: foreach (const i; 0 .. 10) {} -- Configure issuemail:

[Issue 6652] foreach parameter with number range is always ref

2012-06-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #14 from bearophile_h...@eml.cc 2012-06-16 05:15:07 PDT --- (In reply to comment #11) In my point of view, as a newcomer to D, more bug-prone is the current behavior. Of course. But here the comparison wasn't between the current

[Issue 6652] foreach parameter with number range is always ref

2012-06-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #15 from Kenji Hara k.hara...@gmail.com 2012-06-16 05:27:32 PDT --- (In reply to comment #13) If phase 3 will be accepted, I hope this syntax too will be accepted: foreach (const i; 0 .. 10) {} I think it should be allowed.

[Issue 6652] foreach parameter with number range is always ref

2012-06-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #16 from Ryuichi OHORI r.97...@gmail.com 2012-06-16 09:00:32 PDT --- (In reply to comment #14) In my point of view, as a newcomer to D, more bug-prone is the current behavior. Of course. But here the comparison wasn't between

[Issue 6652] foreach parameter with number range is always ref

2012-06-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 6652] foreach parameter with number range is always ref

2012-06-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #9 from bearophile_h...@eml.cc 2012-06-15 11:56:35 PDT --- (In reply to comment #8) To reduce breaking of existing codes, 1. Warn to modifying loop variable in foreach body. It is shown only when -w switch is specified. 2.

[Issue 6652] foreach parameter with number range is always ref

2012-06-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||wrong-code ---

[Issue 6652] foreach parameter with number range is always ref

2012-06-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Ryuichi OHORI r.97...@gmail.com changed: What|Removed |Added CC||r.97...@gmail.com

[Issue 6652] foreach parameter with number range is always ref

2012-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Masahiro Nakagawa repeate...@gmail.com changed: What|Removed |Added CC|

[Issue 6652] foreach parameter with number range is always ref

2011-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #4 from d...@dawgfoto.de 2011-09-13 00:02:29 PDT --- https://github.com/D-Programming-Language/dmd/pull/377 Foreach arguments behave like function arguments. Here they don't. The variable can be optimized out, if no altering

[Issue 6652] foreach parameter with number range is always ref

2011-09-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc ---

[Issue 6652] foreach parameter with number range is always ref

2011-09-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #2 from d...@dawgfoto.de 2011-09-12 14:35:51 PDT --- Making a const/immutable copy is not the right solution to this. Instead a mutable copy of a hidden loop variable should be made. Being a copy is the common behavior for non-ref