[Issue 2054] Const system broken on struct assignment.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 28 18:54:11 PDT 2008


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





------- Comment #2 from brunodomedeiros+bugz at gmail.com  2008-04-28 20:54 -------
(In reply to comment #1)
> (In reply to comment #0)
> > void main()
> > {
> >         char ch = 'd';
> >         invariant Struct iStruct = {&ch};
> I would believe this to be just as wrong. Mutable is not implicitly castable to
> invariant, and ch might change even though iStruct assumes it does not.

Duh me, that's right of course. Massive distraction of mine :S


-- 



More information about the Digitalmars-d-bugs mailing list