[Issue 3927] array.length++; is an error, but ++array.length compiles
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 22 07:01:45 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=3927
--- Comment #6 from yebblies <yebblies at gmail.com> 2012-02-23 02:01:42 EST ---
(In reply to comment #5)
> (In reply to comment #4)
> > Fixed for D2 only.
>
> void main() {
> int[] array = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ];
> writeln(array, "~", ++array.length,
> "->", --array.length);
> assert (array.length == 10); // no problem
> ++array.length;
> --array.length;
> writeln(array, "~", array.length);
> }
>
> DMD version: 2.057
> ==================
> salih at DB-N150-N210-N220:~/d.ders$ ./dene
> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]~11->10
> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]~10
>
> No problem...
Huh? What's your point?
--
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