Don <> changed:

           What    |Removed                     |Added
           Keywords|wrong-code                  |performance

--- Comment #9 from Don <> 2010-07-28 23:01:36 PDT ---
(In reply to comment #8)
> Well... there can be a problem with immutable literals because immutability is
> transitive... hmm...
> Even if literals aren't immutable, compiler can still catch assignment of
> literal to mutable array and report error.

But it is EXPLICITLY LEGAL to assign a literal to a mutable array. There is an
invisible dup by design. I don't like this, I argued strongly against it, but
it's in there. This isn't wrong code.
(Similarly, you can write const C x = new C; The C will be allocated on the
heap, even though it will never change afterwards).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to