[Issue 10376] Glaring hole in const system

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 16 10:49:41 PDT 2013


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



--- Comment #3 from timon.gehr at gmx.ch 2013-06-16 10:49:40 PDT ---
(In reply to comment #2)
> Surely the bigger bug here is that they share the same array, regardless of
> mutability?

There is in fact an issue related to this:

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

If it is valid, then this can be treated as a duplicate, but the spec is silent
about it. OTOH, the spec states that immutable memory does not change during
its lifetime, legitimizing this report.

> I would expect each instance of C to default with a new array.

Currently, there is one static init block that is blitted over the class memory
before the constructor is called. What you suggest would IMO be another valid
way to resolve this issue.

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