[Issue 6399] [CTFE] struct member array.length -= x doesn't work, while array[0..$-x] works

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 30 14:03:06 PDT 2011


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-07-30 14:03:03 PDT ---
Actually  array.length = array.length - x  also works. It's only +=, -= that
fail.

It's because it gets changed into: 
(tmp = &array, *(tmp).length = *(tmp.length)-x );
and  (*p).length = n; isn't yet implemented.

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