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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 21 08:32:50 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #20 from Kenji Hara <k.hara.pg at 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: -------


More information about the Digitalmars-d-bugs mailing list