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


Walter Bright <bugzi...@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzi...@digitalmars.com
         Resolution|                            |INVALID


--- Comment #2 from Walter Bright <bugzi...@digitalmars.com> 2012-01-31 
21:27:41 PST ---
I'm going to argue this is not a bug.

While "xxx" is immutable, "xxx"~['c'] is mutable. Otherwise, it would be an
error to use it to initialize x2.

Hence, x2 can modify it. Since x2 is a reference to the initializer, not a copy
of it, the initializer is modified.

The spec says that string literals in the source code are immutable, not
incidental string literals in the compiler that result from other operations.

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

Reply via email to