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


s...@iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |s...@iname.com




------- Comment #3 from s...@iname.com  2009-04-02 13:12 -------
(In reply to comment #2)
> According to specs http://digitalmars.com/d/2.0/struct.html works() is 
> correct.

Where on that page is the issue addressed?

> I think, broken() is correct, since invariant data can be referenced directly,
> so it's incorrect for it to change in time.

I'm a little puzzled by your use of "correct".  By my calculation, both are
incorrect - the difference is whether the compiler correctly diagnoses this
fact.

It makes no sense to reassign a struct that has immutable members by any means.
 In fact, a struct with at least one immutable member should be treated as
itself immutable for most purposes.

I'll look into it a bit more when I've time....


-- 

Reply via email to