[Issue 6611] array[]++ and array[]-- too?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 6 10:22:47 PDT 2011


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



--- Comment #2 from bearophile_hugs at eml.cc 2011-09-06 10:22:34 PDT ---
(In reply to comment #1)
> This line implies the following
> a[]++ => (auto tmp = a[].dup, ++a[], tmp)
> 
> Do we really want it to be this easy to do?

I understand. If doing this is not good, then I suggest to turn this into a
diagnostic enhancement request. So given code like this:

void main() {
    int[10] a;
    a[]++;
}


to raise a single error message that explains why that vector op is on purpose
not supported.

-- 
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