[Issue 4090] No foreach type inference with const, ref etc modifiers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 6 06:27:15 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4090
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #12 from Kenji Hara <k.hara.pg at gmail.com> 2012-11-06 06:27:12 PST ---
(In reply to comment #11)
> void main() {
> int[] array = [10, 20, 30];
> foreach (const i, x; array) {}
> foreach (immutable i, x; array) {}
> }
>
>
> It gives:
>
> test.d(3): Error: cannot modify const expression __key5
> test.d(4): Error: cannot modify immutable expression __key7
>
>
> Do you want me to reopen this bug report?
Ouch... sorry, will fix and post the 3rd pull.
--
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