[Issue 2625] Creating new struct with literal bypasses immutability of members if struct is in array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 4 07:16:07 PDT 2009


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





------- Comment #7 from maxmo at pochta.ru  2009-04-04 09:16 -------
(In reply to comment #6)
> That bit talks about the whole struct being declared const.

it talks about members too.

> > I meant, it's correct that error is given for broken().
> 
> To me, that's the compiler being correct - quite a different thing from the
> code being correct.

both functions have the same code.


-- 



More information about the Digitalmars-d-bugs mailing list