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


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com
            Summary|Invariant/const-ness is     |Invariant/const-ness is
                   |broken by built-in array    |broken by built-in array
                   |properties                  |properties sort and reverse


--- Comment #9 from Steven Schveighoffer <schvei...@yahoo.com> 2010-03-16 
20:06:45 PDT ---
The length property problems of this bug are fixed via the patch in bug 3637. 
This was incorporated in dmd 2.041.

The original test case for the length was invalid.

the code still prints 4 3 2 0, because it is OK to append to an
invariant(int)[].

A valid test that would have failed prior to 2.041:

import std.stdio;
void main()
{
invariant(int)[] x = [1,2,3,4];
auto y = x;
x.length = x.length - 1;
x.length = x.length + 1;
writeln(y); // prints 1 2 3 4 (prior to 2.041 would print 1 2 3 0)
writeln(x); // prints 1 2 3 0
}

The sort and reverse property bugs remain valid bugs.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to