[Issue 3927] array.length++; is an error, but ++array.length compiles

Salih Dincer bearophile_hugs at eml.cc
Wed Feb 22 06:05:37 PST 2012


> --- Comment #4 from Walter Bright <bugzilla at digitalmars.com> 
> 2012-02-22 01:31:32 PST ---
> Fixed for D2 only.

void main() {
        int[] array = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ];
        writeln(array, "~", --array.length);
        assert (array.length == 9);
}

Which one is correct?

Best regards...



More information about the Digitalmars-d-bugs mailing list