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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Steven Schveighoffer <schvei...@yahoo.com> 2010-02-18 
10:33:46 PST ---
s is not immutable, only the data it points to.

s is of type immutable(char)[], which means the array itself can be added to or
reassigned to another slice of data, but the data it points to is immutable. 
It is read "an array of immutable chars" instead of "an immutable array of
chars".

If you want an immutable string, do:

immutable string s = "ab";

Which you will not be able to change the length of.

Also could do:

immutable char[] s = "ab";

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

Reply via email to