View mode: basic / threaded / horizontal-split · Log in · Help
June 21, 2012
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #20 from Kenji Hara <k.hara.pg@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; array)
> > Yeah, it should apply to the index variable as well.

(Sorry, I accidentally pressed the "commit" button...)

OK. Now, my pull requests also care the key of array in iteration.

You can see the test case:
https://github.com/D-Programming-Language/dmd/pull/1008/files#L5L-1

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 21, 2012
Re: [Issue 6652] New: foreach parameter with number range is always ref
> foreach parameter with number range is always ref
I noticed this by getting into infinite loops. But that, more 
than anything, hints of very bad programming style. :)
June 21, 2012
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #21 from github-bugzilla@puremagic.com 2012-06-21 14:21:51 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/8ea1a0ef35b9cef3047699396487f4d2fe149a39
fix Issue 6652 - 1. Warn modifying non ref variable if -w is specified.

https://github.com/D-Programming-Language/dmd/commit/38a0a5141a3455395e8b9571a57bf85ed698c6b3
Merge pull request #1008 from 9rnsr/fix6652_1

fix Issue 6652 - 1. Warn modifying non ref variable if -w is specified.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 22, 2012
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #22 from dawg@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 are receiving this mail because: -------
November 03, 2012
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #23 from Kenji Hara <k.hara.pg@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 receiving this mail because: -------
November 03, 2012
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #24 from bearophile_hugs@eml.cc 2012-11-03 07:06:12 PDT ---
See also:

http://forum.dlang.org/thread/znbtczbgipqqzllafmzk@forum.dlang.org

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 13, 2012
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #25 from github-bugzilla@puremagic.com 2012-11-13 14:38:59 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/780ce35e8338435e5d063da2cc93360d7f0aecbd
Appendix for Issue 6652

If *implicit ref* foreach key doesn't have a mutable type, warning is not
necessary.

https://github.com/D-Programming-Language/dmd/commit/882324ed350d087949e000a78b32c75396ea003a
Merge pull request #1276 from 9rnsr/fix6652a

Appendix for Issue 6652

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 24, 2013
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #26 from github-bugzilla@puremagic.com 2013-01-24 09:56:33 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ac7fd08a9e08fb333d9341f21bdb19ba42e1ee38
fix Issue 6652 - 2. Deprecate modifying non ref variable.

https://github.com/D-Programming-Language/dmd/commit/ae95b0f935e00ec03224180a24c4396485367eb8
Merge pull request #1009 from 9rnsr/fix6652_2

fix Issue 6652 - 2. Deprecate modifying non ref variable.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 05, 2013
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
            Status|NEW                         |RESOLVED
                CC|                            |andrej.mitrovich@gmail.com
        Resolution|                            |FIXED


--- Comment #27 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-05 13:16:06 PST ---
This is now a deprecated feature. I've closed the report, but perhaps it should
stay open until the feature is completely gone?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 07, 2013
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #28 from github-bugzilla@puremagic.com 2013-03-06 21:32:07 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6e018c83c2fcd138c6596ca63a3fbf9140e9c69c
fix Issue 6652 - 3. Change modifying non ref variable allowed and not affect to
loop

https://github.com/D-Programming-Language/dmd/commit/ad74ad3bd8ae763db3f68c0a6647cb1909d477dd
Merge pull request #1010 from 9rnsr/fix6652_3

fix Issue 6652 - 3. Change modifying non ref variable allowed and not affect to
loop

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2 3 4
Top | Discussion index | About this forum | D home